code: def features_node_edge_graph(obj):
      
      points = {}
      features = obj['features']
      for feature in tqdm(obj['features']):
          for (lon, lat) in geojson.utils.coords(feature):
              points.setdefault((lon, lat), 0)
              points[(lon, lat)] += 1
      points = [p for (p, c) in points.items() if c > 1]
      features = [geojson.Point(p) for p in points]
  
      # For each feature, split it into "edge" features
      # that occur between every point.
      for f in tqdm(obj['features']):
          seqs = []
          seq = []
          for point in geojson.utils.coords(f):
              if len(seq) > 0:
                  seq.append(point)
              if point in points:
                  seq.append(point)
                  if len(seq) > 1 and seq[0] in points:
                      seqs.append(seq)
                      seq = [point]
          for seq in seqs:
              features.append(geojson.Feature(geometry={"coordinates":seq, "type":f['geometry']['type']}, properties=f['properties'], type=f['type']))
  
      obj['features'] = features
      return obj
docs: Transform the features into a more graph-like structure by
      appropriately splitting LineString features into two-point
      "edges" that connect Point "nodes".