Notwithstanding anything contained in the Code of Criminal Procedure, 1973, all offences under sub section (1) of section 16 shall be tried in a summary way by a Judicial Magistrate of the first class specially empowered in this behalf by the State Government or by a Metropolitan Magistrate and the provisions of sections 262 to 265 (both inclusive) of the said Code shall, as far as may be, apply to such trial : Provided that in the case of any conviction in a summary trial under this section, it shall be lawful for the Magistrate to pass a sentence of imprisonment for a term not exceeding one year : Provided further that when at the commencement of, or in the course of, a summary trial under this section, it appears to the Magistrate that the nature of the case is such that a sentence of imprisonment for a term exceeding one year may have to be passed or that it is, for any other reason, undesirable to try the case summarily, the Magistrate shall after hearing the parties record an order to that effect and thereafter recall any witness who may have been examined and proceed to hear or rehear the case in the manner provided by the said Code.