class_docstr: This class provides a very high level route plan.
class_docstr_tok: ["This","class","provides","a","very","high","level","route","plan","."]
docstr: This method returns the last successive intersection edge
  from a starting index on the route.
  This helps moving past tiny intersection edges to calculate
  proper turn decisions.
docstr_tok: ["This","method","returns","the","last","successive","intersection","edge","from","a","starting","index","on","the","route",".","This","helps","moving","past","tiny","intersection","edges","to","calculate","proper","turn","decisions","."]
code: def _successive_last_intersection_edge(self, index, route):
      """
      This method returns the last successive intersection edge
      from a starting index on the route.
      This helps moving past tiny intersection edges to calculate
      proper turn decisions.
      """
  
      last_intersection_edge = None
      last_node = None
      for node1, node2 in [
          (route[i], route[i + 1]) for i in range(index, len(route) - 1)
      ]:
          candidate_edge = self._graph.edges[node1, node2]
          if node1 == route[index]:
              last_intersection_edge = candidate_edge
          if (
              candidate_edge["type"] == RoadOption.LANEFOLLOW
              and candidate_edge["intersection"]
          ):
              last_intersection_edge = candidate_edge
              last_node = node2
          else:
              break
  
      return last_node, last_intersection_edge
  
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 10 for calling the GlobalRoutePlanner obj's underlying member method code with example usage: obj._successive_last_intersection_edge(index, route) and returns: last_node,  last_intersection_edge