If the person having the prisoner in his custody is brought before the court or judge, as for a criminal offense, he shall be examined, committed, bailed or discharged by the court or judge in the like manner as in other criminal cases of like nature.
MCL 600.4346