(1) Where in any indictment or information any act or omission is charged against any person as an offence, and it is given in evidence on the trial of such person for that offence that he or she was insane, so as not to be responsible, according to law, for his or her actions at the time when the act was done or omission made, then, if it appears to the jury before whom such person is tried that he or she did the act or made the omission charged, but was insane as aforesaid at the time when he or she did or made the same, the jury shall return a special verdict to the effect that the accused was guilty of the act or omission charged against him or her, but was insane as aforesaid at the time when he or she did the act or made the omission.