code: def distance_to(self, other_catchment):
          
          try:
              if self.country == other_catchment.country:
                  try:
                      return 0.001 * hypot(self.descriptors.centroid_ngr.x - other_catchment.descriptors.centroid_ngr.x,
                                           self.descriptors.centroid_ngr.y - other_catchment.descriptors.centroid_ngr.y)
                  except TypeError:
                      # In case no centroid available, just return infinity which is helpful in most cases
                      return float('+inf')
              else:
                  # If the catchments are in a different country (e.g. `ni` versus `gb`) then set distance to infinity.
                  return float('+inf')
          except (TypeError, KeyError):
              raise InsufficientDataError("Catchment `descriptors` attribute must be set first.")
docs: Returns the distance between the centroids of two catchments in kilometers.
  
          :param other_catchment: Catchment to calculate distance to
          :type other_catchment: :class:`.Catchment`
          :return: Distance between the catchments in km.
          :rtype: float