'Perform transformations on a given image - async version.
Args:
output_encoding: A value from OUTPUT_ENCODING_TYPES.
quality: A value between 1 and 100 to specify the quality of the
encoding.  This value is only used for JPEG & WEBP quality control.
parse_source_metadata: when True the metadata (EXIF) of the source image
is parsed before any transformations. The results can be retrieved
via Image.get_original_metadata.
transparent_substition_rgb: When transparent pixels are not support in the
destination image format then transparent pixels will be substituted
for the specified color, which must be 32 bit rgb format.
rpc: A UserRPC object.
Returns:
A UserRPC object.
Raises:
BadRequestError when there is something wrong with the request
specifications.
NotImageError when the image data given is not an image.
BadImageError when the image data given is corrupt.
LargeImageError when the image data given is too large to process.
InvalidBlobKeyError when the blob key provided is invalid.
TransformtionError when something errors during image manipulation.
AccessDeniedError: when the blobkey refers to a Google Storage object, and
the application does not have permission to access the object.
ValueError: when transparent_substitution_rgb is not an integer
Error when something unknown, but bad, happens.'

def execute_transforms_async(self, output_encoding=PNG, quality=None, parse_source_metadata=False, transparent_substitution_rgb=None, rpc=None):

    if (output_encoding not in OUTPUT_ENCODING_TYPES):
        raise BadRequestError(('Output    encoding    type    not    in    recognized    set    %s' % OUTPUT_ENCODING_TYPES))
    if (not self._transforms):
        raise BadRequestError('Must    specify    at    least    one    transformation.')
    if transparent_substitution_rgb:
        if (not isinstance(transparent_substitution_rgb, int)):
            raise ValueError('transparent_substitution_rgb    must    be    a    32    bit    integer')
    self.CheckValidIntParameter(quality, 1, 100, 'quality')
    request = images_service_pb.ImagesTransformRequest()
    response = images_service_pb.ImagesTransformResponse()
    input_settings = request.mutable_input()
    input_settings.set_correct_exif_orientation(self._correct_orientation)
    if parse_source_metadata:
        input_settings.set_parse_metadata(True)
    self._set_imagedata(request.mutable_image())
    for transform in self._transforms:
        request.add_transform().CopyFrom(transform)
    request.mutable_output().set_mime_type(output_encoding)
    if (((output_encoding == JPEG) or (output_encoding == WEBP)) and (quality is not None)):
        request.mutable_output().set_quality(quality)
    if transparent_substitution_rgb:
        input_settings.set_transparent_substitution_rgb(transparent_substitution_rgb)
    def execute_transforms_hook(rpc):
        'Check    success,    handles    exceptions    and    returns    the    converted    RPC    result.\n\n                        Args:\n                                rpc:    A    UserRPC    object.\n\n                        Raises:\n                                See    docstring    for    execute_transforms_async    for    more    details.\n                        '
        try:
            rpc.check_success()
        except apiproxy_errors.ApplicationError as e:
            raise _ToImagesError(e, self._blob_key)
        self._image_data = rpc.response.image().content()
        self._blob_key = None
        self._transforms = []
        if response.image().has_width():
            self._width = rpc.response.image().width()
        else:
            self._width = None
        if response.image().has_height():
            self._height = rpc.response.image().height()
        else:
            self._height = None
        self._format = None
        if response.source_metadata():
            self._original_metadata = json.loads(response.source_metadata())
        return self._image_data
    return _make_async_call(rpc, 'Transform', request, response, execute_transforms_hook, None)
