code: def combine_mv_and_lv(mv, lv):
      
  
      combined = {
          c: pd.concat([mv[c], lv[c]], axis=0) for c in list(lv.keys())
      }
  
      combined['Transformer'] = mv['Transformer']
  
      return combined
docs: Combine MV and LV grid topology in PyPSA format