class_docstr: A task scheduler for subpipeline.
code: def __init__(
      self,
      mlmd_handle: metadata.Metadata,
      pipeline: pipeline_pb2.Pipeline,
      task: task_lib.ExecNodeTask,
  ):
      super().__init__(mlmd_handle, pipeline, task)
      self._cancel = threading.Event()
      if task.cancel_type:
          self._cancel.set()
  
      pipeline_node = self.task.get_node()
      self._sub_pipeline = subpipeline_ir_rewrite(
          pipeline_node.raw_proto(), task.execution_id
      )
      self._pipeline_uid = task_lib.PipelineUid.from_pipeline(
          self._sub_pipeline
      )
      self._pipeline_run_id = (
          self._sub_pipeline.runtime_spec.pipeline_run_id.field_value.string_value
      )
  
imports: import copy
  import threading
  from typing import Callable, Optional
  from absl import flags
  from absl import logging
  from tfx.orchestration import metadata
  from tfx.orchestration.experimental.core import pipeline_ops
  from tfx.orchestration.experimental.core import pipeline_state
  from tfx.orchestration.experimental.core import task
  from tfx.orchestration.experimental.core import task_scheduler
  from tfx.orchestration.portable.mlmd import context_lib
  from tfx.orchestration.portable.mlmd import execution_lib
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.utils import status
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 1 to create a new SubPipelineTaskScheduler object from inherited base classes: task_scheduler.TaskScheduler with example: obj = SubPipelineTaskScheduler(mlmd_handle, pipeline, task)