code: def distance_vehicle(waypoint, vehicle_transform):
      """
      Returns the 2D distance from a waypoint to a vehicle
  
          :param waypoint: actual waypoint
          :param vehicle_transform: transform of the target vehicle
      """
      loc = vehicle_transform.location
      x = waypoint.transform.location.x - loc.x
      y = waypoint.transform.location.y - loc.y
  
      return math.sqrt(x * x + y * y)
  
file_path: carla/PythonAPI/carla/agents/tools/misc.py
imports: import math
  import numpy
  import carla
label_desc: Use image node_id 6 for calling a global function with example usage: distance_vehicle(waypoint, vehicle_transform) and returns: math