If a person confined in a penal institution in any other state may be a material witness in a criminal action pending in a court of record or in a grand jury investigation in this Commonwealth, a judge of the court may certify:
(1) that there is a criminal proceeding or investigation by a grand jury or a criminal action pending in the court;
(2) that a person who is confined in a penal institution in the other state may be a material witness in the proceeding, investigation or action; and
(3) that the presence of the person will be required during a specified time.
The certificate shall be presented to a judge of a court of record in the other state having jurisdiction over the prisoner confined and a notice shall be given to the Attorney General of the state in which the prisoner is confined.