class_docstr: This class provides a very high level route plan.
class_docstr_tok: ["This","class","provides","a","very","high","level","route","plan","."]
code: def _find_closest_in_list(self, current_waypoint, waypoint_list):
      min_distance = float("inf")
      closest_index = -1
      for i, waypoint in enumerate(waypoint_list):
          distance = waypoint.transform.location.distance(
              current_waypoint.transform.location
          )
          if distance < min_distance:
              min_distance = distance
              closest_index = i
  
      return closest_index
  
file_path: carla/PythonAPI/carla/agents/navigation/global_route_planner.py
imports: import math
  import numpy
  import networkx
  import carla
  from agents.navigation.local_planner import RoadOption
  from agents.tools.misc import vector
label_desc: Use image node_id 12 for calling the GlobalRoutePlanner obj's underlying member method code with example usage: obj._find_closest_in_list(current_waypoint, waypoint_list) and returns: closest_index