code: def _build_generator_list(network):
      
  
      genos_mv = pd.DataFrame(columns=
                              ('id', 'obj'))
      genos_lv = pd.DataFrame(columns=
                              ('id', 'obj'))
      genos_lv_agg = pd.DataFrame(columns=
                                  ('la_id', 'id', 'obj'))
  
      # MV genos
      for geno in network.mv_grid.graph.nodes_by_attribute('generator'):
              genos_mv.loc[len(genos_mv)] = [int(geno.id), geno]
      for geno in network.mv_grid.graph.nodes_by_attribute('generator_aggr'):
              la_id = int(geno.id.split('-')[1].split('_')[-1])
              genos_lv_agg.loc[len(genos_lv_agg)] = [la_id, geno.id, geno]
  
      # LV genos
      for lv_grid in network.mv_grid.lv_grids:
          for geno in lv_grid.generators:
              genos_lv.loc[len(genos_lv)] = [int(geno.id), geno]
  
      return genos_mv, genos_lv, genos_lv_agg
docs: Builds DataFrames with all generators in MV and LV grids
  
      Returns
      -------
      :pandas:`pandas.DataFrame<dataframe>`
              A DataFrame with id of and reference to MV generators
      :pandas:`pandas.DataFrame<dataframe>`
              A DataFrame with id of and reference to LV generators
      :pandas:`pandas.DataFrame<dataframe>`
              A DataFrame with id of and reference to aggregated LV generators