If any Magistrate of the first class or Sub-Divisional Magistrate has reason to believe that any person is confined under such circumstances that the confinement amounts to an offence, he may issue a search-warrant, and the person to whom such warrant is directed may search for the person so confined and such search shall be made in accordance ...