code: def run_simulation(args, client):
      """This function performed one test run using the args parameters
      and connecting to the carla client passed.
      """
  
      display_manager = None
      vehicle = None
      vehicle_list = []
      timer = CustomTimer()
  
      try:
          # Getting the world and
          world = client.get_world()
          original_settings = world.get_settings()
  
          if args.sync:
              traffic_manager = client.get_trafficmanager(8000)
              settings = world.get_settings()
              traffic_manager.set_synchronous_mode(True)
              settings.synchronous_mode = True
              settings.fixed_delta_seconds = 0.05
              world.apply_settings(settings)
  
          # Instanciating the vehicle to which we attached the sensors
          bp = world.get_blueprint_library().filter("charger_2020")[0]
          vehicle = world.spawn_actor(
              bp, random.choice(world.get_map().get_spawn_points())
          )
          vehicle_list.append(vehicle)
          vehicle.set_autopilot(True)
  
          # Display Manager organize all the sensors an its display in a window
          # If can easily configure the grid and the total window size
          display_manager = DisplayManager(
              grid_size=[2, 3], window_size=[args.width, args.height]
          )
  
          # Then, SensorManager can be used to spawn RGBCamera, LiDARs and SemanticLiDARs as needed
          # and assign each of them to a grid position,
          SensorManager(
              world,
              display_manager,
              "RGBCamera",
              carla.Transform(
                  carla.Location(x=0, z=2.4), carla.Rotation(yaw=-90)
              ),
              vehicle,
              {},
              display_pos=[0, 0],
          )
          SensorManager(
              world,
              display_manager,
              "RGBCamera",
              carla.Transform(
                  carla.Location(x=0, z=2.4), carla.Rotation(yaw=+00)
              ),
              vehicle,
              {},
              display_pos=[0, 1],
          )
          SensorManager(
              world,
              display_manager,
              "RGBCamera",
              carla.Transform(
                  carla.Location(x=0, z=2.4), carla.Rotation(yaw=+90)
              ),
              vehicle,
              {},
              display_pos=[0, 2],
          )
          SensorManager(
              world,
              display_manager,
              "RGBCamera",
              carla.Transform(
                  carla.Location(x=0, z=2.4), carla.Rotation(yaw=180)
              ),
              vehicle,
              {},
              display_pos=[1, 1],
          )
  
          SensorManager(
              world,
              display_manager,
              "LiDAR",
              carla.Transform(carla.Location(x=0, z=2.4)),
              vehicle,
              {
                  "channels": "64",
                  "range": "100",
                  "points_per_second": "250000",
                  "rotation_frequency": "20",
              },
              display_pos=[1, 0],
          )
          SensorManager(
              world,
              display_manager,
              "SemanticLiDAR",
              carla.Transform(carla.Location(x=0, z=2.4)),
              vehicle,
              {
                  "channels": "64",
                  "range": "100",
                  "points_per_second": "100000",
                  "rotation_frequency": "20",
              },
              display_pos=[1, 2],
          )
  
          # Simulation loop
          call_exit = False
          time_init_sim = timer.time()
          while True:
              # Carla Tick
              if args.sync:
                  world.tick()
              else:
                  world.wait_for_tick()
  
              # Render received data
              display_manager.render()
  
              for event in pygame.event.get():
                  if event.type == pygame.QUIT:
                      call_exit = True
                  elif event.type == pygame.KEYDOWN:
                      if event.key == K_ESCAPE or event.key == K_q:
                          call_exit = True
                          break
  
              if call_exit:
                  break
  
      finally:
          if display_manager:
              display_manager.destroy()
  
          client.apply_batch(
              [carla.command.DestroyActor(x) for x in vehicle_list]
          )
  
          world.apply_settings(original_settings)
  
imports: import glob
  import os
  import sys
  import carla
  import argparse
  import random
  import time
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: run_simulation(args, client) without return types