code: def global_to_local(
      point: carla.Location,
      reference: Union[carla.Transform, carla.Location, carla.Rotation],
  ):
      """Translates a 3D point from global to local coordinates using the current transformation as reference"""
      if isinstance(reference, carla.Transform):
          reference.transform(point)
      elif isinstance(reference, carla.Location):
          carla.Transform(reference, carla.Rotation()).transform(point)
      elif isinstance(reference, carla.Rotation):
          carla.Transform(carla.Location(), reference).transform(point)
      else:
          raise ValueError(
              'Argument "reference" is none of carla.Transform or carla.Location or carla.Rotation!'
          )
  
imports: import os
  import cv2
  import math
  import random
  import numpy
  import carla
  import pygame
  import threading
  import datetime
  from typing import Union
  from tensorforce.agents import Agent
label_desc: Use image node_id 12 for calling a global function with example usage: global_to_local(point, reference) without return types