The superior court in any county may establish administrative assessments, not to exceed ten dollars ($10), for clerical and administrative costs incurred for the following activities:
(a)
An assessment for the cost of recording and maintaining a record of the defendant’s prior convictions for violations of this code. The assessment shall be payable at the time of payment of a fine or when bail is forfeited for any subsequent violations of this code other than parking, pedestrian, or bicycle
violations.
(b)
An assessment for all defendants whose driver’s license or automobile registration is attached or restricted pursuant to Section 40509 or 40509.5, to cover the cost of notifying the Department of Motor Vehicles of the attachment or restriction.