The procedures for handling persons with mental health disorders who are charged with the commission of public offenses are provided for in Section 1026 of the Penal Code and in Chapter 6 (commencing with Section 1365), Title 10, Part 2 of the Penal Code.
Ca. Welf. and Inst. Code § 6825