(A) Police officers shall direct or regulate traffic in accordance with the provisions of this Traffic Code, provided that in the event of fire or other emergency or to expedite traffic or safeguard pedestrians, they are authorized to direct traffic as conditions may require notwithstanding the provisions of this Traffic Code. Firefighters, when at the scene of a fire, may direct or assist the police in directing traffic thereat or in the immediate vicinity. The direction of traffic may be by word or audible signal, by gesture or visible signal or by any combination thereof. No person shall fail to comply with any lawful order or direction of any police officer or firefighter issued pursuant to this section.
(B) No person shall fail to comply with any lawful order or direction of any school crossing guard invested with authority to direct, control or regulate traffic in the vicinity of the school to which such guard may be assigned.