(a) A county court may issue a writ of habeas corpus in any case in which the constitution has not conferred the power on the district courts.
(b) On return of a writ of habeas corpus, the court may remand to custody, admit to bail, or discharge the person imprisoned or detained, as the law and nature of the case require.