Section 330(3)(b) in The Code of Criminal Procedure, 1973
(b)if the Magistrate or Court, as the case may be, is of opinion that discharge of the accused cannot be ordered, the transfer of the accused to a residential facility for persons of unsound mind or mental retardation may be ordered wherein the accused may be provided care and appropriate education and training.]