docs: def graph_from_edges(edges):
      """ Constructs an undirected multigraph from a list containing data on
      weighted edges.
  
      Parameters
      ----------
      edges : list
          List of tuples each containing first node, second node, weight, key.
  
      Returns
      -------
      M : :class:`networkx.classes.multigraph.MultiGraph
      """
  
      M = nx.MultiGraph()
  
      for e in edges:
  
          n0, n1, weight, key = e
  
          M.add_edge(n0, n1, weight=weight, key=key)
  
      return M