(1) This section applies if an accused pleads not guilty because of mental impairment to a charge before the Magistrates Court.
(2) The Magistrates Court must find that the person is not guilty because of mental impairment if—
(a) the court considers the finding appropriate; and
(b) the prosecution agrees to the finding.