code: def PushTask(self, task):
      
      storage_file_size = getattr(task, 'storage_file_size', None)
      if not storage_file_size:
        raise ValueError('Task storage file size not set.')
  
      if task.file_entry_type == dfvfs_definitions.FILE_ENTRY_TYPE_DIRECTORY:
        weight = 1
      else:
        weight = storage_file_size
  
      task.merge_priority = weight
  
      heap_values = (weight, task)
      heapq.heappush(self._heap, heap_values)
      self._task_identifiers.add(task.identifier)
docs: Pushes a task onto the heap.
  
      Args:
        task (Task): task.
  
      Raises:
        ValueError: if the size of the storage file is not set in the task.