The municipal court shall collect a special expense of $10 from each defendant as a condition of dismissal of any case against the defendant because of actions by or on behalf of the defendant subsequent to the date of the alleged offense, such as the completion by the defendant of a safety driving course. Such sum shall be paid into the general funds of the municipality.