docs: def lengths(self,
                  sr,
                  polylines,
                  lengthUnit,
                  calculationType
                  ):
          """
          The lengths operation is performed on a geometry service resource. 
          This operation calculates the 2D Euclidean or geodesic lengths of each 
          polyline specified in the input array.
          
          Inputs:
              polylines - array of polylines whose lengths are to be computed
                          (structured as JSON geometry objects returned by 
                          the ArcGIS REST API).
              sr - spatial reference of the input geometries WKID.
              lengthUnit - unit in which lengths of polylines will be calculated.
              calculationType - defines the length calculation for the geometry.
          """
          allowedCalcTypes = ['planar', 'geodesic', 'preserveShape']
          if calculationType not in allowedCalcTypes:
              raise AttributeError("Invalid calculation Type")
          url = self._url + "/lengths"
          params = {
              "f" : "json",
              "sr" : sr,
              "polylines": self.__geomToStringArray(geometries=polylines,
                                                   returnType="list"),
              "lengthUnit" : lengthUnit,
              "calculationType" : calculationType
          }
  
          return self._get(url=url, param_dict=params,
                              securityHandler=self._securityHandler,
                              proxy_url=self._proxy_url,
                             proxy_port=self._proxy_port)