docstr: Draws bounding boxes on pygame display.
docstr_tok: ["Draws","bounding","boxes","on","pygame","display","."]
code: def draw_bounding_boxes(
      surface, bounding_boxes, color=pygame.Color("red")
  ):
      """
      Draws bounding boxes on pygame display.
      """
      for bbox in bounding_boxes:
          points = [
              (int(bbox[i, 0]), int(bbox[i, 1])) for i in range(8)
          ]
          # draw lines
          # base
          polygon = [points[0], points[1], points[2], points[3]]
          pygame.draw.polygon(surface, color, polygon)
          # top
          polygon = [points[4], points[5], points[6], points[7]]
          pygame.draw.polygon(surface, color, polygon)
          # base-top
          polygon = [points[0], points[1], points[5], points[4]]
          pygame.draw.polygon(surface, color, polygon)
          polygon = [points[1], points[2], points[6], points[5]]
          pygame.draw.polygon(surface, color, polygon)
          polygon = [points[2], points[6], points[7], points[3]]
          pygame.draw.polygon(surface, color, polygon)
          polygon = [points[0], points[4], points[7], points[3]]
          pygame.draw.polygon(surface, color, polygon)
  
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 5 for calling the RssBoundingBoxVisualizer obj's underlying member method code with example usage: obj.draw_bounding_boxes(surface, bounding_boxes, color) without return types