code: def tick(self, individual_rss_states):
      state_surface = pygame.Surface((220, self._display_dimensions[1]))
      state_surface.set_colorkey(pygame.Color("black"))
      v_offset = 0
  
      if individual_rss_states:
          surface = self._font.render(
              "RSS States:", True, (255, 255, 255)
          )
          state_surface.blit(surface, (8, v_offset))
          v_offset += 26
      for state in individual_rss_states:
          object_name = "Obj"
          if state.rss_state.objectId == 18446744073709551614:
              object_name = "Border Left"
          elif state.rss_state.objectId == 18446744073709551615:
              object_name = "Border Right"
          else:
              other_actor = state.get_actor(self._world)
              if other_actor:
                  li = list(other_actor.type_id.split("."))
                  if li:
                      li.pop(0)
                  li = [element.capitalize() for element in li]
  
                  object_name = " ".join(li).strip()[:15]
  
          mode = "?"
          if (
              state.actor_calculation_mode
              == ad.rss.map.RssMode.Structured
          ):
              mode = "S"
          elif (
              state.actor_calculation_mode
              == ad.rss.map.RssMode.Unstructured
          ):
              mode = "U"
          elif (
              state.actor_calculation_mode
              == ad.rss.map.RssMode.NotRelevant
          ):
              mode = "-"
          item = "%4s % 2dm %8s" % (mode, state.distance, object_name)
  
          surface = self._font.render(item, True, (255, 255, 255))
          state_surface.blit(surface, (5, v_offset))
          color = (128, 128, 128)
          if (
              state.actor_calculation_mode
              != ad.rss.map.RssMode.NotRelevant
          ):
              if state.is_dangerous:
                  color = (255, 0, 0)
              else:
                  color = (0, 255, 0)
          pygame.draw.circle(
              state_surface, color, (12, v_offset + 7), 5
          )
          xpos = 184
          if (
              state.actor_calculation_mode
              == ad.rss.map.RssMode.Structured
          ):
              if not state.rss_state.longitudinalState.isSafe and (
                  (
                      state.rss_state.longitudinalState.rssStateInformation.evaluator
                      == "LongitudinalDistanceSameDirectionOtherInFront"
                  )
                  or (
                      state.rss_state.longitudinalState.rssStateInformation.evaluator
                      == "LongitudinalDistanceSameDirectionEgoFront"
                  )
              ):
                  pygame.draw.polygon(
                      state_surface,
                      (255, 255, 255),
                      (
                          (xpos + 1, v_offset + 1 + 4),
                          (xpos + 6, v_offset + 1 + 0),
                          (xpos + 11, v_offset + 1 + 4),
                          (xpos + 7, v_offset + 1 + 4),
                          (xpos + 7, v_offset + 1 + 12),
                          (xpos + 5, v_offset + 1 + 12),
                          (xpos + 5, v_offset + 1 + 4),
                      ),
                  )
                  xpos += 14
  
              if not state.rss_state.longitudinalState.isSafe and (
                  (
                      state.rss_state.longitudinalState.rssStateInformation.evaluator
                      == "LongitudinalDistanceOppositeDirectionEgoCorrectLane"
                  )
                  or (
                      state.rss_state.longitudinalState.rssStateInformation.evaluator
                      == "LongitudinalDistanceOppositeDirection"
                  )
              ):
                  pygame.draw.polygon(
                      state_surface,
                      (255, 255, 255),
                      (
                          (xpos + 2, v_offset + 1 + 8),
                          (xpos + 6, v_offset + 1 + 12),
                          (xpos + 10, v_offset + 1 + 8),
                          (xpos + 7, v_offset + 1 + 8),
                          (xpos + 7, v_offset + 1 + 0),
                          (xpos + 5, v_offset + 1 + 0),
                          (xpos + 5, v_offset + 1 + 8),
                      ),
                  )
                  xpos += 14
  
              if not state.rss_state.lateralStateRight.isSafe and not (
                  state.rss_state.lateralStateRight.rssStateInformation.evaluator
                  == "None"
              ):
                  pygame.draw.polygon(
                      state_surface,
                      (255, 255, 255),
                      (
                          (xpos + 0, v_offset + 1 + 4),
                          (xpos + 8, v_offset + 1 + 4),
                          (xpos + 8, v_offset + 1 + 1),
                          (xpos + 12, v_offset + 1 + 6),
                          (xpos + 8, v_offset + 1 + 10),
                          (xpos + 8, v_offset + 1 + 8),
                          (xpos + 0, v_offset + 1 + 8),
                      ),
                  )
                  xpos += 14
              if not state.rss_state.lateralStateLeft.isSafe and not (
                  state.rss_state.lateralStateLeft.rssStateInformation.evaluator
                  == "None"
              ):
                  pygame.draw.polygon(
                      state_surface,
                      (255, 255, 255),
                      (
                          (xpos + 0, v_offset + 1 + 6),
                          (xpos + 4, v_offset + 1 + 1),
                          (xpos + 4, v_offset + 1 + 4),
                          (xpos + 12, v_offset + 1 + 4),
                          (xpos + 12, v_offset + 1 + 8),
                          (xpos + 4, v_offset + 1 + 8),
                          (xpos + 4, v_offset + 1 + 10),
                      ),
                  )
                  xpos += 14
          elif (
              state.actor_calculation_mode
              == ad.rss.map.RssMode.Unstructured
          ):
              text = ""
              if (
                  state.rss_state.unstructuredSceneState.response
                  == ad.rss.state.UnstructuredSceneResponse.DriveAway
              ):
                  text = "  D"
              elif (
                  state.rss_state.unstructuredSceneState.response
                  == ad.rss.state.UnstructuredSceneResponse.ContinueForward
              ):
                  text = "  C"
              elif (
                  state.rss_state.unstructuredSceneState.response
                  == ad.rss.state.UnstructuredSceneResponse.Brake
              ):
                  text = "  B"
              surface = self._font.render(text, True, (255, 255, 255))
              state_surface.blit(surface, (xpos, v_offset))
  
          v_offset += 14
          self._surface = state_surface
  
imports: import glob
  import os
  import sys
  from enum import Enum
  import math
  import numpy
  import pygame
  import weakref
  import carla
  from carla import ad
label_desc: Use image node_id 2 for calling the RssStateVisualizer obj's underlying member method code with example usage: obj.tick(individual_rss_states) without return types