def METHOD_NAME(self):
    """
    Switch off all traffic lights.
    """
    for actor in self.world.get_actors():
        if actor.type_id == 'traffic.traffic_light':
            actor.freeze(True)
            # We set the traffic light to 'green' because 'off' state sets the traffic light to
            # 'red'.
            actor.set_state(carla.TrafficLightState.Green)