code: def main(args):
      try:
          client = carla.Client(args.host, int(args.port))
          client.set_timeout(150.0)
          pygame.init()
  
          records = {}
          maps = define_maps(client)
  
          if args.show_scenarios:
              show_benchmark_scenarios(maps)
              return
  
          # maps = ["Town04_Opt"]
  
          for town in maps:
              world = client.load_world(town)
              time.sleep(5)
  
              # set to async mode
              set_world_settings(world)
  
              # spectator pointing to the sky to reduce rendering impact
              spectator = world.get_spectator()
              spectator.set_transform(
                  carla.Transform(
                      carla.Location(z=500), carla.Rotation(pitch=90)
                  )
              )
  
              for weather in define_weather():
                  world.set_weather(weather["parameter"])
                  for env in define_environments():
                      for sensors in define_sensors():
                          list_fps = run_benchmark(
                              world,
                              sensors,
                              env["vehicles"],
                              env["walkers"],
                              client,
                          )
                          mean, std = compute_mean_std(list_fps)
                          sensor_str = ""
                          for sensor in sensors:
                              sensor_str += sensor["label"] + " "
  
                          record = {
                              "town": town,
                              "sensors": sensor_str,
                              "weather": weather["name"],
                              "n_vehicles": env["vehicles"],
                              "n_walkers": env["walkers"],
                              "samples": args.ticks,
                              "fps_mean": mean,
                              "fps_std": std,
                          }
  
                          env_str = str(env["vehicles"]) + str(
                              env["walkers"]
                          )
  
                          if env_str not in records:
                              records[env_str] = []
                          records[env_str].append(record)
                          print(record)
  
          system_specs = get_system_specs()
          serialize_records(records, system_specs, args.file)
          pygame.quit()
  
      except KeyboardInterrupt:
          set_world_settings(world)
          client.reload_world()
          print("\nCancelled by user. Bye!")
  
imports: import sys
  from tr import tr
  import argparse
  import cpuinfo
  import glob
  import math
  import numpy
  import os
  import psutil
  import pygame
  import shutil
  import GPUtil
  import threading
  import time
  import logging
  import carla
label_desc: Use image node_id 13 for calling a global function with example usage: main(args) without return types