docs: def mv_connect_stations(mv_grid_district, graph, debug=False):
      """ Connect LV stations to MV grid
  
      Args
      ----
      mv_grid_district: MVGridDistrictDing0
          MVGridDistrictDing0 object for which the connection process has to be done
      graph: :networkx:`NetworkX Graph Obj< >`
          NetworkX graph object with nodes
      debug: bool, defaults to False
          If True, information is printed during process
  
      Returns
      -------
      :networkx:`NetworkX Graph Obj< >`
          NetworkX graph object with nodes and newly created branches
      """
  
      # WGS84 (conformal) to ETRS (equidistant) projection
      proj1 = partial(
              pyproj.transform,
              pyproj.Proj(init='epsg:4326'),  # source coordinate system
              pyproj.Proj(init='epsg:3035'))  # destination coordinate system
  
      # ETRS (equidistant) to WGS84 (conformal) projection
      proj2 = partial(
              pyproj.transform,
              pyproj.Proj(init='epsg:3035'),  # source coordinate system
              pyproj.Proj(init='epsg:4326'))  # destination coordinate system
  
      conn_dist_weight = cfg_ding0.get('mv_connect', 'load_area_sat_conn_dist_weight')
      conn_dist_ring_mod = cfg_ding0.get('mv_connect', 'load_area_stat_conn_dist_ring_mod')
  
      for lv_load_area in mv_grid_district.lv_load_areas():
  
          # exclude aggregated Load Areas and choose only load areas that were connected to grid before
          if not lv_load_area.is_aggregated and \
             lv_load_area.lv_load_area_centre not in mv_grid_district.mv_grid.graph_isolated_nodes():
  
              lv_load_area_centre = lv_load_area.lv_load_area_centre
  
              # there's only one station: Replace Load Area centre by station in graph
              if lv_load_area.lv_grid_districts_count() == 1:
                  # get station
                  lv_station = list(lv_load_area.lv_grid_districts())[0].lv_grid.station()
  
                  # get branches that are connected to Load Area centre
                  branches = mv_grid_district.mv_grid.graph_branches_from_node(lv_load_area_centre)
  
                  # connect LV station, delete Load Area centre
                  for node, branch in branches:
                      # backup kind and type of branch
                      branch_kind = branch['branch'].kind
                      branch_type = branch['branch'].type
                      branch_ring = branch['branch'].ring
  
                      # respect circuit breaker if existent
                      circ_breaker = branch['branch'].circuit_breaker
                      if circ_breaker is not None:
                          branch['branch'].circuit_breaker.geo_data = calc_geo_centre_point(lv_station, node)
  
                      # delete old branch to Load Area centre and create a new one to LV station
                      graph.remove_edge(lv_load_area_centre, node)
  
                      branch_length = calc_geo_dist_vincenty(lv_station, node)
                      branch = BranchDing0(length=branch_length,
                                           circuit_breaker=circ_breaker,
                                           kind=branch_kind,
                                           type=branch_type,
                                           ring=branch_ring)
                      if circ_breaker is not None:
                          circ_breaker.branch = branch
                      graph.add_edge(lv_station, node, branch=branch)
  
                  # delete Load Area centre from graph
                  graph.remove_node(lv_load_area_centre)
  
              # there're more than one station: Do normal connection process (as in satellites)
              else:
                  # connect LV stations of all grid districts
                  # =========================================
                  for lv_grid_district in lv_load_area.lv_grid_districts():
                      # get branches that are partly or fully located in load area
                      branches = calc_geo_branches_in_polygon(mv_grid_district.mv_grid,
                                                              lv_load_area.geo_area,
                                                              mode='intersects',
                                                              proj=proj1)
  
                      # filter branches that belong to satellites (load area groups) if Load Area is not a satellite
                      # itself
                      if not lv_load_area.is_satellite:
                          branches_valid = []
                          for branch in branches:
                              node1 = branch['adj_nodes'][0]
                              node2 = branch['adj_nodes'][1]
                              lv_load_area_group = get_lv_load_area_group_from_node_pair(node1, node2)
  
                              # delete branch as possible conn. target if it belongs to a group (=satellite) or
                              # if it belongs to a ring different from the ring of the current LVLA
                              if (lv_load_area_group is None) and\
                                 (branch['branch'].ring is lv_load_area.ring):
                                  branches_valid.append(branch)
                          branches = branches_valid
  
                      # find possible connection objects
                      lv_station = lv_grid_district.lv_grid.station()
                      lv_station_shp = transform(proj1, lv_station.geo_data)
                      conn_objects_min_stack = find_nearest_conn_objects(lv_station_shp, branches, proj1,
                                                                         conn_dist_weight, debug,
                                                                         branches_only=False)
  
                      # connect!
                      connect_node(lv_station,
                                   lv_station_shp,
                                   mv_grid_district.mv_grid,
                                   conn_objects_min_stack[0],
                                   proj2,
                                   graph,
                                   conn_dist_ring_mod,
                                   debug)
  
                  # Replace Load Area centre by cable distributor
                  # ================================================
                  # create cable distributor and add it to grid
                  cable_dist = MVCableDistributorDing0(geo_data=lv_load_area_centre.geo_data,
                                                       grid=mv_grid_district.mv_grid)
                  mv_grid_district.mv_grid.add_cable_distributor(cable_dist)
  
                  # get branches that are connected to Load Area centre
                  branches = mv_grid_district.mv_grid.graph_branches_from_node(lv_load_area_centre)
  
                  # connect LV station, delete Load Area centre
                  for node, branch in branches:
                      # backup kind and type of branch
                      branch_kind = branch['branch'].kind
                      branch_type = branch['branch'].type
                      branch_ring = branch['branch'].ring
  
                      # respect circuit breaker if existent
                      circ_breaker = branch['branch'].circuit_breaker
                      if circ_breaker is not None:
                          branch['branch'].circuit_breaker.geo_data = calc_geo_centre_point(cable_dist, node)
  
                      # delete old branch to Load Area centre and create a new one to LV station
                      graph.remove_edge(lv_load_area_centre, node)
  
                      branch_length = calc_geo_dist_vincenty(cable_dist, node)
                      branch = BranchDing0(length=branch_length,
                                           circuit_breaker=circ_breaker,
                                           kind=branch_kind,
                                           type=branch_type,
                                           ring=branch_ring)
                      if circ_breaker is not None:
                          circ_breaker.branch = branch
                      graph.add_edge(cable_dist, node, branch=branch)
  
                  # delete Load Area centre from graph
                  graph.remove_node(lv_load_area_centre)
  
              # Replace all overhead lines by cables
              # ====================================
              # if grid's default type is overhead line
              if mv_grid_district.mv_grid.default_branch_kind == 'line':
                  # get all branches in load area
                  branches = calc_geo_branches_in_polygon(mv_grid_district.mv_grid,
                                                          lv_load_area.geo_area,
                                                          mode='contains',
                                                          proj=proj1)
                  # set type
                  for branch in branches:
                      branch['branch'].kind = mv_grid_district.mv_grid.default_branch_kind_settle
                      branch['branch'].type = mv_grid_district.mv_grid.default_branch_type_settle
  
      return graph