code: def main(arg):
      """Main function of the script"""
      client = carla.Client(arg.host, arg.port)
      client.set_timeout(30.0)
      world = client.get_world()
      pre_settings = world.get_settings()
      world = client.load_world("Town03")
  
      spectator_transform = carla.Transform(
          carla.Location(120, -256, 5), carla.Rotation(yaw=180)
      )
      spectator_transform.location.z += 5
      spectator = world.get_spectator()
      spectator.set_transform(spectator_transform)
  
      try:
          # Setting output temporal folder
          output_path = os.path.dirname(os.path.realpath(__file__))
          output_path = (
              os.path.join(output_path, "_collisions") + os.path.sep
          )
          if not os.path.exists(output_path):
              os.mkdir(output_path)
  
          test_list = [
              CollisionScenarioTester(
                  TwoSpawnedCars(client, world, True), output_path
              ),
              CollisionScenarioTester(
                  TwoCarsSlowSpeedCollision(client, world, True),
                  output_path,
              ),
              CollisionScenarioTester(
                  TwoCarsHighSpeedCollision(client, world, True),
                  output_path,
              ),
              CollisionScenarioTester(
                  CarBikeCollision(client, world, True), output_path
              ),
              CollisionScenarioTester(
                  CarWalkerCollision(client, world, True), output_path
              ),
              CollisionScenarioTester(
                  ThreeCarsSlowSpeedCollision(client, world, True),
                  output_path,
              ),
              CollisionScenarioTester(
                  ThreeCarsHighSpeedCollision(client, world, True),
                  output_path,
              ),
          ]
  
          repetitions = 10
          for item in test_list:
              print(
                  "--------------------------------------------------------------"
              )
              # item.test_scenario(20,  20, repetitions)
              # item.test_scenario(20,  40, repetitions)
              # item.test_scenario(20,  60, repetitions)
              # item.test_scenario(20,  80, repetitions)
              out = item.test_scenario(20, 100, repetitions)
              print(out)
  
          print(
              "--------------------------------------------------------------"
          )
  
          # Remove all the output files
          # shutil.rmtree(path)
  
      finally:
          world.apply_settings(pre_settings)
  
imports: import glob
  import os
  import sys
  import argparse
  import time
  import filecmp
  import shutil
  import numpy
  import carla
label_desc: Use image node_id 1 for calling a global function with example usage: main(arg) without return types