docs: def distance(self,
                   sr,
                   geometry1,
                   geometry2,
                   distanceUnit="",
                   geodesic=False
                   ):
          """The distance operation is performed on a geometry service resource. 
          It reports the 2D Euclidean or geodesic distance between the two geometries.
          
          Inputs:
              geometry1 - geometry from which the distance is to be measured 
                          (structured as JSON geometry objects returned by the ArcGIS REST API).
              geometry2 - geometry to which the distance is to be measured
                          (structured as JSON geometry objects returned by the ArcGIS REST API).
              sr - spatial reference of the input geometries WKID.
              distanceUnit - units for measuring distance between the geometry1 
                             and geometry2 geometries.
              geodesic - if set to true, geodesic distance is used to calculate maxSegmentLength.
          """
          url = self._url + "/distance"
          params = {
              "f" : "json",
              "sr" : sr,
              "distanceUnit" : distanceUnit,
              "geodesic" : geodesic
          }
          geometry1 = self.__geometryToGeomTemplate(geometry=geometry1)
          geometry2 = self.__geometryToGeomTemplate(geometry=geometry2)
          params['geometry1'] = geometry1
          params['geometry2'] = geometry2
          return self._get(url=url,
                              param_dict=params,
                              securityHandler=self._securityHandler,
                              proxy_url=self._proxy_url,
                              proxy_port=self._proxy_port)