class_docstr: Represent a GCS Object, including all its revisions.
class_docstr_tok: ["Represent","a","GCS","Object",",","including","all","its","revisions","."]
docstr: Complete a rewrite from `source` into this object.
  
  :param gcs_url:str the root URL for the fake GCS service.
  :param request:flask.Request the contents of the HTTP request.
  :param body:dict the HTTP payload, parsed via json.loads()
  :param source:GcsObjectVersion the source object version.
  :return: the newly created object version.
  :rtype: GcsObjectVersion
docstr_tok: ["Complete","a","rewrite","from","`","source","`","into","this","object",".",":","param","gcs_url",":","str","the","root","URL","for","the","fake","GCS","service",".",":","param","request",":","flask.Request","the","contents","of","the","HTTP","request",".",":","param","body",":","dict","the","HTTP","payload",",","parsed","via","json.loads","(",")",":","param","source",":","GcsObjectVersion","the","source","object","version",".",":","return",":","the","newly","created","object","version",".",":","rtype",":","GcsObjectVersion"]
code: def rewrite_finish(self, gcs_url, request, body, source):
      """Complete a rewrite from `source` into this object.
  
      :param gcs_url:str the root URL for the fake GCS service.
      :param request:flask.Request the contents of the HTTP request.
      :param body:dict the HTTP payload, parsed via json.loads()
      :param source:GcsObjectVersion the source object version.
      :return: the newly created object version.
      :rtype: GcsObjectVersion
      """
      media = source.media
      self.check_preconditions(request)
      self.generation_generator += 1
      revision = GcsObjectVersion(
          gcs_url,
          self.bucket_name,
          self.name,
          self.generation_generator,
          request,
          media,
      )
      revision.update_from_metadata(body)
      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 20 for calling the GcsObject obj's underlying member method code with example usage: obj.rewrite_finish(gcs_url, request, body, source) and returns: revision