code: def define_sensors():
      list_sensor_specs = []
  
      if args.tm:
          sensors00 = [
              {
                  "type": "sensor.camera.rgb",
                  "x": 0.7,
                  "y": 0.0,
                  "z": 1.60,
                  "roll": 0.0,
                  "pitch": 0.0,
                  "yaw": 0.0,
                  "width": 300,
                  "height": 200,
                  "fov": 100,
                  "label": "0. cam-300x200",
              }
          ]
  
          list_sensor_specs.append(sensors00)
  
      else:
          sensors00 = [
              {
                  "type": "sensor.camera.rgb",
                  "x": 0.7,
                  "y": 0.0,
                  "z": 1.60,
                  "roll": 0.0,
                  "pitch": 0.0,
                  "yaw": 0.0,
                  "width": 1920,
                  "height": 1080,
                  "fov": 100,
                  "label": "0. cam-1920x1080",
              }
          ]
  
          sensors01 = [
              {
                  "type": "sensor.camera.rgb",
                  "x": 0.7,
                  "y": 0.0,
                  "z": 1.60,
                  "roll": 0.0,
                  "pitch": 0.0,
                  "yaw": 0.0,
                  "width": 1920,
                  "height": 1080,
                  "fov": 100,
                  "label": "1. cam-1920x1080",
              },
              {
                  "type": "sensor.camera.rgb",
                  "x": 0.7,
                  "y": 0.0,
                  "z": 1.60,
                  "roll": 0.0,
                  "pitch": 0.0,
                  "yaw": 180.0,
                  "width": 1920,
                  "height": 1080,
                  "fov": 100,
                  "label": "cam-1920x1080",
              },
          ]
  
          sensors02 = [
              {
                  "type": "sensor.camera.rgb",
                  "x": 0.7,
                  "y": 0.0,
                  "z": 1.60,
                  "roll": 0.0,
                  "pitch": 0.0,
                  "yaw": 0.0,
                  "width": 1920,
                  "height": 1080,
                  "fov": 100,
                  "label": "2. cam-1920x1080",
              },
              {
                  "type": "sensor.camera.rgb",
                  "x": 0.7,
                  "y": 0.0,
                  "z": 1.60,
                  "roll": 0.0,
                  "pitch": 0.0,
                  "yaw": 90.0,
                  "width": 1920,
                  "height": 1080,
                  "fov": 100,
                  "label": "cam-1920x1080",
              },
              {
                  "type": "sensor.camera.rgb",
                  "x": 0.7,
                  "y": 0.0,
                  "z": 1.60,
                  "roll": 0.0,
                  "pitch": 0.0,
                  "yaw": 180.0,
                  "width": 1920,
                  "height": 1080,
                  "fov": 100,
                  "label": "cam-1920x1080",
              },
          ]
  
          sensors03 = [
              {
                  "type": "sensor.camera.rgb",
                  "x": 0.7,
                  "y": 0.0,
                  "z": 1.60,
                  "roll": 0.0,
                  "pitch": 0.0,
                  "yaw": 0.0,
                  "width": 1920,
                  "height": 1080,
                  "fov": 100,
                  "label": "3. cam-1920x1080",
              },
              {
                  "type": "sensor.camera.rgb",
                  "x": 0.7,
                  "y": 0.0,
                  "z": 1.60,
                  "roll": 0.0,
                  "pitch": 0.0,
                  "yaw": 90.0,
                  "width": 1920,
                  "height": 1080,
                  "fov": 100,
                  "label": "cam-1920x1080",
              },
              {
                  "type": "sensor.camera.rgb",
                  "x": 0.7,
                  "y": 0.0,
                  "z": 1.60,
                  "roll": 0.0,
                  "pitch": 0.0,
                  "yaw": 180.0,
                  "width": 1920,
                  "height": 1080,
                  "fov": 100,
                  "label": "cam-1920x1080",
              },
              {
                  "type": "sensor.camera.rgb",
                  "x": 0.7,
                  "y": 0.0,
                  "z": 1.60,
                  "roll": 0.0,
                  "pitch": 0.0,
                  "yaw": 270.0,
                  "width": 1920,
                  "height": 1080,
                  "fov": 100,
                  "label": "cam-1920x1080",
              },
          ]
  
          sensors04 = [
              {
                  "type": "sensor.lidar.ray_cast",
                  "x": 0.7,
                  "y": 0.0,
                  "z": 1.60,
                  "yaw": 0.0,
                  "pitch": 0.0,
                  "roll": 0.0,
                  "pts_per_sec": "100000",
                  "label": "4. LIDAR: 100k",
              }
          ]
  
          sensors05 = [
              {
                  "type": "sensor.lidar.ray_cast",
                  "x": 0.7,
                  "y": 0.0,
                  "z": 1.60,
                  "yaw": 0.0,
                  "pitch": 0.0,
                  "roll": 0.0,
                  "pts_per_sec": "500000",
                  "label": "5. LIDAR: 500k",
              }
          ]
  
          sensors06 = [
              {
                  "type": "sensor.lidar.ray_cast",
                  "x": 0.7,
                  "y": 0.0,
                  "z": 1.60,
                  "yaw": 0.0,
                  "pitch": 0.0,
                  "roll": 0.0,
                  "pts_per_sec": "1000000",
                  "label": "6. LIDAR: 1M",
              }
          ]
  
          list_sensor_specs.append(sensors00)
          list_sensor_specs.append(sensors01)
          list_sensor_specs.append(sensors02)
          list_sensor_specs.append(sensors03)
          list_sensor_specs.append(sensors04)
          list_sensor_specs.append(sensors05)
          list_sensor_specs.append(sensors06)
  
          if args.sensors is not None:
              try:
                  new_list = [
                      list_sensor_specs[int(i)] for i in args.sensors
                  ]
                  list_sensor_specs = new_list
              except IndexError as error:
                  print(
                      "Warning!! The list of sensors introduced is not valid. Using all available."
                  )
  
      return list_sensor_specs
  
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 2 for calling a global function with example usage: define_sensors() and returns: list_sensor_specs