class_docstr: Abstract class that represents a task that is created by an PhysicalOperator.
  
  The task can be either a regular task or an actor task.
class_docstr_tok: ["Abstract","class","that","represents","a","task","that","is","created","by","an","PhysicalOperator",".","The","task","can","be","either","a","regular","task","or","an","actor","task","."]
docstr: Return the index of the task.
docstr_tok: ["Return","the","index","of","the","task","."]
code: def task_index(self) -> int:
      """Return the index of the task."""
      return self._task_index
  
imports: from abc import ABC, abstractmethod
  from typing import Any, Callable, Dict, List, Optional, Union
  import ray
  from .ref_bundle import RefBundle
  from ray._raylet import ObjectRefGenerator
  from ray.data._internal.execution.interfaces.execution_options import ExecutionOptions, ExecutionResources
  from ray.data._internal.execution.interfaces.op_runtime_metrics import OpRuntimeMetrics
  from ray.data._internal.logical.interfaces import Operator
  from ray.data._internal.stats import StatsDict
  from ray.data.context import DataContext
label_desc: Use image node_id 2 for calling the OpTask obj's underlying member method code with example usage: obj.task_index() and returns: self