docs: def node_list_to_coordinate_lines(G, node_list, use_geom=True):
      """
      Given a list of nodes, return a list of lines that together follow the path
      defined by the list of nodes.
  
      Parameters
      ----------
      G : networkx multidigraph
      route : list
          the route as a list of nodes
      use_geom : bool
          if True, use the spatial geometry attribute of the edges to draw
          geographically accurate edges, rather than just lines straight from node
          to node
  
      Returns
      -------
      lines : list of lines given as pairs ( (x_start, y_start), (x_stop, y_stop) )
      """
      edge_nodes = list(zip(node_list[:-1], node_list[1:]))
      lines = []
      for u, v in edge_nodes:
          # if there are parallel edges, select the shortest in length
          data = min(G.get_edge_data(u, v).values(), key=lambda x: x['length'])
  
          # if it has a geometry attribute (ie, a list of line segments)
          if 'geometry' in data and use_geom:
              # add them to the list of lines to plot
              xs, ys = data['geometry'].xy
              lines.append(list(zip(xs, ys)))
          else:
              # if it doesn't have a geometry attribute, the edge is a straight
              # line from node to node
              x1 = G.nodes[u]['x']
              y1 = G.nodes[u]['y']
              x2 = G.nodes[v]['x']
              y2 = G.nodes[v]['y']
              line = [(x1, y1), (x2, y2)]
              lines.append(line)
      return lines