§ 4950 -   Rights of accused person; application for writ of habeas corpus

§ 4950. Rights of accused person; application for writ of habeas corpus

A person arrested upon such warrant shall not be delivered over to the agent whom the executive authority demanding him or her shall have appointed to receive him or her unless he shall first be taken forthwith before a judge of a court of record in this state, who shall inform him or her of the demand made for his or her surrender and of the crime with which he is charged, and that he has the right to demand and procure legal counsel. If the prisoner or his or her counsel shall state that he or they desire to test the legality of the arrest, the judge of such court of record shall fix a reasonable time to be allowed him or her within which to apply for a writ of habeas corpus. When such writ is applied for, notice thereof, and of the time and place of hearing thereon, shall be given to the state's attorney of the county in which the arrest is made and in which the accused is in custody, and to the agent of the demanding state.