(1)Whenever any person is convicted of an offence punishable under Section 53, Section 54, Section 55, Section 56 or Section 60 and the Court convicting him is of the opinion that it is necessary to require such person to execute a bond for abstaining from the commission of offences punishable under these sections, the Court may, at the time of passing sentence on such person, order him to execute a bond; for a sum proportionate to his means with or without sureties, for abstaining from the commission of such offences during such period, not exceeding three years as it thinks fit to fix.