Any judge having jurisdiction over offenses committed under any statute of this state or municipal ordinance of any city or town regulating the operation of motor vehicles on highways shall have the authority to require any person brought before the judge's court for an alleged violation to submit to a reexamination by the department of safety when the judge has good cause to believe that the person, by reason of physical or mental disability, would not be able to operate a motor vehicle with safety upon the highways, or, in the discretion of the judge, would create a hazard to the driving public. However, the operator's or chauffeur's license of the person shall not be withheld or suspended pending the reexamination.