code: def densify(self,
                  geometries,
                  sr,
                  maxSegmentLength,
                  lengthUnit,
                  geodesic=False,
                  ):
          
          url = self._url + "/densify"
          params = {
              "f" : "json",
              "sr" : sr,
              "maxSegmentLength" : maxSegmentLength,
              "lengthUnit" : lengthUnit,
              "geodesic" : geodesic
          }
          if isinstance(geometries, list) and len(geometries) > 0:
              template = {"geometryType": None,
                          "geometries" : []}
              for g in geometries:
                  if isinstance(g, Polyline):
                      template['geometryType'] = "esriGeometryPolyline"
                  elif isinstance(g, Polygon):
                      template['geometryType'] = "esriGeometryPolygon"
                  else:
                      raise AttributeError("Invalid geometry type")
                  template['geometries'].append(g.asDictionary)
              params['geometries'] = template
          return self._get(url=url, param_dict=params,
                              securityHandler=self._securityHandler,
                              proxy_url=self._proxy_url,
                              proxy_port = self._proxy_port)
docs: The densify operation is performed on a geometry service resource. This 
          operation densifies geometries by plotting points between existing vertices.
          
          Inputs:
              geometries - array of geometries to be densified (structured as JSON geometry 
                           objects returned by the ArcGIS REST API).
              sr - spatial reference of the input geometries WKID.
              maxSegmentLength - all segments longer than maxSegmentLength are replaced 
                                 with sequences of lines no longer than maxSegmentLength.
              geodesic - if set to true, geodesic distance is used to calculate maxSegmentLength.
              lengthUnit - length unit of maxSegmentLength.