code: def _CopyFileObjectToTemporaryFile(self, file_object, temporary_file):
      
      file_object.seek(0, os.SEEK_SET)
      data = file_object.read(self._READ_BUFFER_SIZE)
      while data:
        temporary_file.write(data)
        data = file_object.read(self._READ_BUFFER_SIZE)
docs: Copies the contents of the file-like object to a temporary file.
  
      Args:
        file_object (dfvfs.FileIO): file-like object.
        temporary_file (file): temporary file.