Penal Code 1367.1
If during a pending misdemeanor action the judge determines there is reason to believe that the defendant is mentally disordered and may be incompetent to stand, the judge must state this and the reasons for the belief in the record. The judge shall ask the defendant's attorney if she believes the defendant is mentally disordered. If the attorney believes the defendant may be mentally disordered, the court shall refer the defendant for evaluation and treatment. The court may order the facility providing treatment and evaluation to provide the court with the defendant's discharge summary.