code: def __init__(
      self,
      test,
      sensor_type,
      attributes,
      sensor_name=None,
      sensor_queue=None,
  ):
      self.test = test
      self.world = test.world
      self.sensor_type = sensor_type
      self.error = None
      self.name = sensor_name
      self.queue = sensor_queue
      self.curr_det_pts = 0
  
      if self.sensor_type == SensorType.LIDAR:
          self.bp_sensor = self.world.get_blueprint_library().filter(
              "sensor.lidar.ray_cast"
          )[0]
      elif self.sensor_type == SensorType.SEMLIDAR:
          self.bp_sensor = self.world.get_blueprint_library().filter(
              "sensor.lidar.ray_cast_semantic"
          )[0]
      else:
          self.error = "Unknown type of sensor"
  
      for key in attributes:
          self.bp_sensor.set_attribute(key, attributes[key])
  
      tranf = self.world.get_map().get_spawn_points()[0]
      tranf.location.z += 3
      self.sensor = self.world.spawn_actor(self.bp_sensor, tranf)
      self.sensor.listen(
          lambda sensor_data: self.callback(
              sensor_data, self.name, self.queue
          )
      )
  
imports: from .None import SyncSmokeTest
  from .None import SmokeTest
  import carla
  import time
  import math
  import numpy
  from enum import Enum
  from queue import Queue
  from queue import Empty
label_desc: Use image node_id 1 to create a new Sensor object  with example: obj = Sensor(test, sensor_type, attributes, sensor_name, sensor_queue)