Whenever it appears that a person against whom an indictment has been found or information filed in any court in this state is insane or mentally defective to the extent that he is unable to understand the proceedings against him or to assist in his defense, or whenever the existence of insanity or mental defect on the part of the defendant at the time of the alleged commission of the offense charged becomes an issue in the cause, all proceedings to determine the fact of the insanity or mental defect shall be in accordance with the provisions of Code of Criminal Procedure Article 641 et seq.
La. R.S. § 28:58