class_docstr: CarlaSimulation is responsible for the management of the carla simulation.
class_docstr_tok: ["CarlaSimulation","is","responsible","for","the","management","of","the","carla","simulation","."]
docstr: Switch off all traffic lights.
docstr_tok: ["Switch","off","all","traffic","lights","."]
code: def switch_off_traffic_lights(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)
  
file_path: carla/Co-Simulation/Sumo/sumo_integration/carla_simulation.py
imports: import logging
  import carla
  from .constants import INVALID_ACTOR_ID, SPAWN_OFFSET_Z
label_desc: Use image node_id 6 for calling the CarlaSimulation obj's underlying member method code with example usage: obj.switch_off_traffic_lights() without return types