code: def calc_geo_dist_vincenty(node_source, node_target):
      
  
      branch_detour_factor = cfg_ding0.get('assumptions', 'branch_detour_factor')
  
      # notice: vincenty takes (lat,lon)
      branch_length = branch_detour_factor * vincenty((node_source.geo_data.y, node_source.geo_data.x),
                                                      (node_target.geo_data.y, node_target.geo_data.x)).m
  
      # ========= BUG: LINE LENGTH=0 WHEN CONNECTING GENERATORS ===========
      # When importing generators, the geom_new field is used as position. If it is empty, EnergyMap's geom
      # is used and so there are a couple of generators at the same position => length of interconnecting
      # line is 0. See issue #76
      if branch_length == 0:
          branch_length = 1
          logger.warning('Geo distance is zero, check objects\' positions. '
                         'Distance is set to 1m')
      # ===================================================================
  
      return branch_length
docs: Calculates the geodesic distance between `node_source` and `node_target`
      incorporating the detour factor specified in :file:`ding0/ding0/config/config_calc.cfg`.
  
      Parameters
      ----------
      node_source: LVStationDing0, GeneratorDing0, or CableDistributorDing0
          source node, member of GridDing0._graph
      node_target: LVStationDing0, GeneratorDing0, or CableDistributorDing0
          target node, member of GridDing0._graph
  
      Returns
      -------
      :any:`float`
          Distance in m