(1) The court may not inquire into a defendant’s immigration status, and may not require a defendant to disclose the defendant’s immigration status, at any time during a criminal proceeding.
(2) Subsection (1) of this section does not prohibit a defendant from knowingly and voluntarily disclosing to the court the defendant’s immigration status at any time during the criminal proceeding.