section 3 or section 4, and if the court passes any sentence of imprisonment on the offender; it shall record its reasons for doing SO_ (2) For the purpose of satisfying itself whether it would not be desirable to deal under