code: def _add_task(cls,
                  worker_task,
                  mapreduce_spec,
                  queue_name):
      
      if not _run_task_hook(mapreduce_spec.get_hooks(),
                            "enqueue_worker_task",
                            worker_task,
                            queue_name):
        try:
          # Not adding transactionally because worker_task has name.
          # Named task is not allowed for transactional add.
          worker_task.add(queue_name)
        except (taskqueue.TombstonedTaskError,
                taskqueue.TaskAlreadyExistsError), e:
          logging.warning("Task %r already exists. %s: %s",
                          worker_task.name,
                          e.__class__,
                          e)
docs: Schedule slice scanning by adding it to the task queue.
  
      Args:
        worker_task: a model.HugeTask task for slice. This is NOT a taskqueue
          task.
        mapreduce_spec: an instance of model.MapreduceSpec.
        queue_name: Optional queue to run on; uses the current queue of
          execution or the default queue if unspecified.