§ 3985. Habeas corpus to bring respondent or witness into court
Nothing in this chapter shall prevent a court from issuing a writ of habeas corpus, when necessary, to bring before it a prisoner for trial in a criminal cause pending in the court, or to be surrendered in discharge of bail, or examined as a witness in any action or proceeding, civil or criminal, pending in such court, when the personal attendance and examination of the witness is necessary in the administration of justice.