code: def nodes_from_line(self, line):
          
  
          return dict([(v, k) for k, v in
                       nx.get_edge_attributes(self, 'line').items()])[line]
docs: Get nodes adjacent to line
  
          Here, line refers to the object behind the key 'line' of the attribute
          dict attached to each edge.
  
          Parameters
          ----------
          line: edisgo.grid.components.Line
              A eDisGo line object
  
          Returns
          -------
          tuple
              Nodes adjacent to this edge