When it appears to any court, authorized by law to issue the writ of habeas corpus, that anyone is illegally held in custody, confinement, or restraint, and that there is reason to believe that such person will be carried out of the jurisdiction of the court before whom the application is made, or
COL120106
will suffer some irreparable injury before compliance with the writ of habeas corpus can be enforced, such court may cause a warrant to be issued, reciting the facts, and directed to the Chief of Police, commanding such officer to take such person thus held in custody, confinement, or restraint, and forthwith bring him before such court, to be dealt with according to law. NOTE: Section 135.58 is substantively the same as former § 1497. See also Cal. Pen. Code § 1497 (same). See generally B. Witkin, California Criminal Procedure Habeas Corpus and Other Extraordinary Writs § 819 (1963).