class_docstr: Represent a GCS Object, including all its revisions.
class_docstr_tok: ["Represent","a","GCS","Object",",","including","all","its","revisions","."]
docstr: Compose a new revision based on the give flask request.
  
  :param gcs_url:str the root URL for the fake GCS service.
  :param request:flask.Request the contents of the HTTP request.
  :param composed_media:str contents of the composed object
  :return: the newly created object version.
  :rtype: GcsObjectVersion
docstr_tok: ["Compose","a","new","revision","based","on","the","give","flask","request",".",":","param","gcs_url",":","str","the","root","URL","for","the","fake","GCS","service",".",":","param","request",":","flask.Request","the","contents","of","the","HTTP","request",".",":","param","composed_media",":","str","contents","of","the","composed","object",":","return",":","the","newly","created","object","version",".",":","rtype",":","GcsObjectVersion"]
code: def compose_from(self, gcs_url, request, composed_media):
      """Compose a new revision based on the give flask request.
  
      :param gcs_url:str the root URL for the fake GCS service.
      :param request:flask.Request the contents of the HTTP request.
      :param composed_media:str contents of the composed object
      :return: the newly created object version.
      :rtype: GcsObjectVersion
      """
      self.generation_generator += 1
      revision = GcsObjectVersion(
          gcs_url,
          self.bucket_name,
          self.name,
          self.generation_generator,
          request,
          composed_media,
      )
      payload = json.loads(request.data)
      if payload.get("destination") is not None:
          revision.update_from_metadata(payload.get("destination"))
      # The server often discards the MD5 Hash when composing objects, we can
      # easily maintain them in the testbench, but dropping them helps us
      # detect bugs sooner.
      revision.metadata.pop("md5Hash")
      self._insert_revision(revision)
      return revision
  
imports: import base64
  import crc32c
  import error_response
  import hashlib
  import json
  import struct
  import testbench_utils
  import time
label_desc: Use image node_id 15 for calling the GcsObject obj's underlying member method code with example usage: obj.compose_from(gcs_url, request, composed_media) and returns: revision