class_docstr: A MapOperator implementation that executes tasks on a task pool.
code: def shutdown(self):
      # Cancel all active tasks.
      for _, task in self._data_tasks.items():
          ray.cancel(task.get_waitable())
      # Wait until all tasks have failed or been cancelled.
      for _, task in self._data_tasks.items():
          try:
              ray.get(task.get_waitable())
          except ray.exceptions.RayError:
              # Cancellation either succeeded, or the task had already failed with
              # a different error, or cancellation failed. In all cases, we
              # swallow the exception.
              pass
      super().shutdown()
  
file_path: ray/python/ray/data/_internal/execution/operators/task_pool_map_operator.py
imports: from typing import Any, Dict, Optional
  import ray
  from ray.data._internal.execution.interfaces import ExecutionResources, PhysicalOperator, RefBundle, TaskContext
  from ray.data._internal.execution.operators.map_operator import MapOperator, _map_task
  from ray.data._internal.execution.operators.map_transformer import MapTransformer
  from ray.data._internal.remote_fn import cached_remote_fn
  from ray.data.context import DataContext
label_desc: Use image node_id 3 for calling the TaskPoolMapOperator obj's underlying member method code with example usage: obj.shutdown() without return types