extractAndValidateTransforms = (obj) => {
    const extracted = {};
    ['crs', 'crs_transform', 'dimensions', 'region'].forEach((key) => {
      if (key in obj) {
        extracted[key] = obj[key];
      }
    });
    // Since dimensions and scale are mutually exclusive, we ignore scale
    // if dimensions are specified.
    if (obj['scale'] != null && obj['dimensions'] == null) {
      extracted['scale'] = obj['scale'];
    }
    return extracted;
  }
Processes the ee.data.getDownloadId parameters and returns the built image
based on the given transformation parameters (crs, crs_transform, dimensions,
scale, and region). Band level parameters override the parameters
specified in the top level. If both dimensions and scale parameters are
present, the scale parameter is always ignored.

Image transformations will be applied on a per band basis if the
format parameter is ZIPPED_GEO_TIFF_PER_BAND and there are bands in the bands
list. Otherwise, the transformations will be applied on the entire image and
the band transformation parameters will be ignored.

@param {!ee.Image} image The image to include in the request.
@param {!Object} params The getDownloadId parameters.
@return {!ee.Image} The image filtered to the given bands and the associated
    transformations applied.