docs: def estimateExportTilesSize(self,
                                  exportBy,
                                  levels,
                                  tilePackage=False,
                                  exportExtent="DEFAULTEXTENT",
                                  areaOfInterest=None,
                                  async=True):
          """
          The estimateExportTilesSize operation is an asynchronous task that
          allows estimation of the size of the tile package or the cache data
          set that you download using the Export Tiles operation. This
          operation can also be used to estimate the tile count in a tile
          package and determine if it will exceced the maxExportTileCount
          limit set by the administrator of the service. The result of this
          operation is Map Service Job. This job response contains reference
          to Map Service Result resource that returns the total size of the
          cache to be exported (in bytes) and the number of tiles that will
          be exported.
  
          Inputs:
  
          tilePackage - Allows estimating the size for either a tile package
           or a cache raster data set. Specify the value true for tile
           packages format and false for Cache Raster data set. The default
           value is False
             Values: True | False
          exportExtent - The extent (bounding box) of the tile package or the
           cache dataset to be exported. If extent does not include a spatial
           reference, the extent values are assumed to be in the spatial
           reference of the map. The default value is full extent of the
           tiled map service.
  	   Syntax: <xmin>, <ymin>, <xmax>, <ymax>
             Example 1: -104,35.6,-94.32,41
          exportBy - The criteria that will be used to select the tile
           service levels to export. The values can be Level IDs, cache scales
           or the Resolution (in the case of image services).
  	   Values: LevelID | Resolution | Scale
          levels - Specify the tiled service levels for which you want to get
           the estimates. The values should correspond to Level IDs, cache
           scales or the Resolution as specified in exportBy parameter. The
           values can be comma separated values or a range.
  	   Example 1: 1,2,3,4,5,6,7,8,9
  	   Example 2: 1-4,7-9
          areaOfInterest - (Optional) The areaOfInterest polygon allows
           exporting tiles within the specified polygon areas. This parameter
           supersedes exportExtent parameter. Also excepts geometry.Polygon.
  	   Example: { "features": [{"geometry":{"rings":[[[-100,35],
               [-100,45],[-90,45],[-90,35],[-100,35]]],
               "spatialReference":{"wkid":4326}}}]}
          async - (optional) the estimate function is run asynchronously
           requiring the tool status to be checked manually to force it to
           run synchronously the tool will check the status until the
           estimation completes.  The default is True, which means the status
           of the job and results need to be checked manually.  If the value
           is set to False, the function will wait until the task completes.
             Values: True | False
          """
          url = self._url + "/estimateExportTilesSize"
          params = {
              "f" : "json",
              "levels" : levels,
              "exportBy" : exportBy,
              "tilePackage" : tilePackage,
              "exportExtent" : exportExtent
          }
          params["levels"] = levels
          if not areaOfInterest is None:
              if isinstance(areaOfInterest, Polygon):
                  template = { "features": [areaOfInterest.asDictionary]}
                  params['areaOfInterest'] = template
              else:
                  params['areaOfInterest'] = areaOfInterest
          if async == True:
              return self._get(url=url,
                                  param_dict=params,
                                  securityHandler=self._securityHandler,
                                  proxy_url=self._proxy_url,
                                  proxy_port=self._proxy_port)
          else:
              exportJob = self._get(url=url,
                                       param_dict=params,
                                       securityHandler=self._securityHandler,
                                       proxy_url=self._proxy_url,
                                       proxy_port=self._proxy_port)
              jobUrl = "%s/jobs/%s" % (url, exportJob['jobId'])
              gpJob = GPJob(url=jobUrl,
                            securityHandler=self._securityHandler,
                            proxy_port=self._proxy_port,
                            proxy_url=self._proxy_url)
              status = gpJob.jobStatus
              while status != "esriJobSucceeded":
                  if status in ['esriJobFailed',
                                'esriJobCancelling',
                                'esriJobCancelled']:
                      return gpJob.messages
                  else:
                      time.sleep(5)
                      status = gpJob.jobStatus
              return gpJob.results