4. (1) When any person has been convicted of any offence by a Magistrate's Court under its summary jurisdiction, or
before such court under the provisions of section 10, if after due inquiry the Magistrate is of opinion that the person so convicted or appearing or brought before the court is a vagrant within the meaning of this Ordinance, he may, in addition to or in substitution for any punishment which he has power to inflict, order such person to be detained in a house of detention. Any such order shall declare that the person against whom it is made is a vagrant, and shall also, if practicable, state any prior date from which, in the opinion of the Magistrate, such person has been in Sri Lanka a vagrant as defined by this Ordinance. Such order shall be a sufficient authority to the police for keeping in custody such person on the way to the house of detention and to the superintendent for receiving and detaining him there.
(2) Every person detained in a house of detention under this section shall be detained until he avails himself of suitable employment found for him, or until he is removed or discharged as hereinafter mentioned.
(3) Every person so detained shall be put to any labour of which the medical officer shall certify him to be capable. *Detention of vagrants on order of a Magistrate's*