(a) A defendant arrested, held, or present in a county other than that in which an indictment or accusation is pending against that defendant may state in writing a wish to plead guilty, guilty but mentally ill, guilty but with intellectual disability, or nolo contendere; to waive trial in the county in which the indictment or accusation is pending; and to consent to disposition of the case in the county in which the defendant was arrested, held, or present, subject to the approval of the prosecuting attorney for each county. Upon receipt of the defendant's statement and the written approval of the prosecuting attorney for each county, the clerk of the court in which the indictment or accusation is pending shall transmit the papers in the proceeding or certified copies thereof to the clerk of the court for the county in which the defendant was arrested, held, or present, and the prosecution shall continue in that county.
(b) A defendant arrested, held, or present in a county other than the county in which a complaint or arrest warrant is pending against that defendant may state in writing a wish to plead guilty, guilty but mentally ill, guilty but with intellectual disability, or nolo contendere; to waive venue and trial in the county in which the complaint or warrant was issued; and to consent to disposition of the case in the county in which the defendant was arrested, held, or present, subject to the approval of the prosecuting attorney for each county. Upon receipt of the defendant's statement and the written approval of the prosecuting attorney for each county, the clerk of the court in which the complaint or arrest warrant is pending shall transmit the papers in the proceeding or certified copies thereof to the clerk of the court for the county in which the defendant was arrested, held, or present, and the prosecution shall continue in that county.
(c) If after the proceeding has been transferred pursuant to subsection (a) or (b) of this Code section the defendant pleads not guilty or not guilty by reason of insanity, the clerk shall return the papers to the court in which the prosecution was commenced and the proceeding shall be restored to the docket of that court. A defendant's statement that the defendant wishes to plead guilty, guilty but mentally ill, guilty but with intellectual disability, or nolo contendere shall not be used against the defendant.