Section 367(1) in Bharatiya Nagarik Suraksha Sanhita, 2023
(1)When a Magistrate holding an inquiry has reason to believe that the person against whom the inquiry is being held is a person of unsound mind and consequently incapable of making his defence, the Magistrate shall inquire into the fact of such unsoundness of mind, and shall cause such person to be examined by the civil surgeon of the district or such other medical officer as the State Government may direct, and thereupon shall examine such surgeon or other medical officer as a witness, and shall reduce the examination to writing.