Section 369(1) in Bharatiya Nagarik Suraksha Sanhita, 2023
(1)Whenever a person if found under section 367 or section 368 to be incapable of entering defence by reason of unsoundness of mind or intellectual disability, the Magistrate or Court, as the case may be, shall, whether the case is one in which bail may be taken or not, order release of such person on bail:Provided that the accused is suffering from unsoundness of mind or intellectual disability which does not mandate in-patient treatment and a friend or relative undertakes to obtain regular out-patient psychiatric treatment from the nearest medical facility and to prevent from doing injury to himself or to any other person.