(1)If it appears to the person in-charge of a State run custodial institution (including beggars homes, orphanages, women's protection homes and children homes) that any resident of the institution has, or is likely to have, a mental illness, then, he shall take such resident of the institution to the nearest mental health establishment run or funded by the appropriate Government for assessment and treatment, as necessary.