Such writ may also be issued by any such court, judge or justice thereof, upon application of a party to a suit or proceeding pending before any officer authorized to examine witnesses, to bring any person confined in the jail of the same county, or the county next adjoining that where the suit or proceeding is to be heard or had, before such officer, to be examined as a witness.
§ 491.240, RSMo