(1) If a judge of a court of record, in any state which by its laws has made provision for commanding persons within that state to attend and testify in this state, certifies under the seal of such court that there is a criminal prosecution pending in such court, or that a grand jury investigation has commenced or is about to commence, that a person being within this state is a material witness in such prosecution or grand jury investigation, and that that person’s presence will be required for a specified number of days, upon presentation of such certificate to any judge of a court of record in the county in which such person is, such judge shall fix a time and place for a hearing and shall make an order directing the witness to appear at a time and place certain for the hearing. The witness shall at all times be entitled to counsel.
(2) If at a hearing the judge determines that the witness is material and necessary, that it will not cause undue hardship to the witness to be compelled to attend and testify in the prosecution or a grand jury investigation in the other state, and that the laws of the state in which the prosecution is pending, or grand jury investigation has commenced or is about to commence, will give to the witness protection from arrest and the service of civil and criminal process, the judge shall issue a summons, with a copy of the certificate attached, directing the witness to attend and testify in the court where the prosecution is pending, or where a grand jury investigation has commenced or is about to commence at a time and place specified in the summons. In any such hearing the certificate shall be prima facie evidence of all the facts stated therein.
(3) If said certificate recommends that the witness be taken into immediate custody and delivered to an officer of the requesting state to assure her or his attendance in the requesting state, such judge may, in lieu of notification of the hearing, direct that such witness be forthwith brought before her or him for said hearing; and the judge at the hearing being satisfied of the desirability of such custody and delivery, for which determination the certificate shall be prima facie proof of such desirability, may, in lieu of issuing subpoena or summons, order that said witness be forthwith taken in custody and delivered to an officer of the requesting state.
(4) If the witness, who is summoned as above provided, after being paid or tendered by some properly authorized person the sum of 10 cents a mile for each mile by the ordinary traveled route to and from the court where the prosecution is pending and $5 for each day that the witness is required to travel and attend as a witness, fails without good cause to attend and testify as directed in the summons, the witness shall be punished in the manner provided for the punishment of any witness who disobeys a summons issued from a court of record in this state.