Penal Code § 369b
TITLE 10. OF CRIMES AGAINST THE PUBLIC HEALTH AND SAFETY
(a) This section shall only apply to counties with a population greater than 500,000.
(b) The court may order any person convicted of a rail transit related traffic violation, as listed in subdivision (c), to attend a traffic school that offers, as a part of its curriculum, a film developed or caused to be developed by a transportation commission or authority on rail transit safety.
(c) For a first offense, a court, at its discretion, may order any person cited for any of the following violations to attend a traffic school offering a rail safety presentation, Internet rail safety test, or rail transit safety film prepared by a county transportation commission or authority, pay an additional fine of one hundred dollars ($100), or both:
(3) Subdivision (c) of Section 21752, Section 22450, 22451, or 22452, or subdivision (c) of Section 22526, of the Vehicle Code, involving railroad grade crossings.
(d) For a second or subsequent violation as provided in subdivision (c), a court shall order a person to pay an additional fine of up to two hundred dollars ($200) and to attend a traffic school offering a rail safety presentation, Internet rail safety test, or rail safety film prepared by a county transportation commission or authority.
(e) All fines collected according to this section shall be distributed pursuant to Sections 1463 and 1463.12, as applicable.