code: def assign_mv_feeder_to_nodes(mv_grid):
      
      mv_station_neighbors = mv_grid.graph.neighbors(mv_grid.station)
      # get all nodes in MV grid and remove MV station to get separate subgraphs
      mv_graph_nodes = mv_grid.graph.nodes()
      mv_graph_nodes.remove(mv_grid.station)
      subgraph = mv_grid.graph.subgraph(mv_graph_nodes)
  
      for neighbor in mv_station_neighbors:
          # determine feeder
          mv_feeder = mv_grid.graph.line_from_nodes(mv_grid.station, neighbor)
          # get all nodes in that feeder by doing a DFS in the disconnected
          # subgraph starting from the node adjacent to the MVStation `neighbor`
          subgraph_neighbor = nx.dfs_tree(subgraph, source=neighbor)
          for node in subgraph_neighbor.nodes():
              # in case of an LV station assign feeder to all nodes in that LV
              # grid
              if isinstance(node, LVStation):
                  for lv_node in node.grid.graph.nodes():
                      lv_node.mv_feeder = mv_feeder
              else:
                  node.mv_feeder = mv_feeder
docs: Assigns an MV feeder to every generator, LV station, load, and branch tee
  
      Parameters
      -----------
      mv_grid : :class:`~.grid.grids.MVGrid`