class_docstr: A task scheduler for Manual system node.
class_docstr_tok: ["A","task","scheduler","for","Manual","system","node","."]
code: def schedule(self) -> task_scheduler.TaskSchedulerResult:
      while not self._cancel.wait(_POLLING_INTERVAL_SECS):
          with mlmd_state.mlmd_execution_atomic_op(
              mlmd_handle=self.mlmd_handle,
              execution_id=self.task.execution_id,
          ) as execution:
              node_state_mlmd_value = execution.custom_properties.get(
                  NODE_STATE_PROPERTY_KEY
              )
              node_state = ManualNodeState.from_mlmd_value(
                  node_state_mlmd_value
              )
              if node_state.state == ManualNodeState.COMPLETED:
                  return task_scheduler.TaskSchedulerResult(
                      status=status_lib.Status(code=status_lib.Code.OK),
                      output=task_scheduler.ExecutorNodeOutput(),
                  )
  
      return task_scheduler.TaskSchedulerResult(
          status=status_lib.Status(code=status_lib.Code.CANCELLED),
          output=task_scheduler.ExecutorNodeOutput(),
      )
  
imports: import threading
  from typing import Optional
  import attr
  from tfx.orchestration import data_types_utils
  from tfx.orchestration import metadata
  from tfx.orchestration.experimental.core import mlmd_state
  from tfx.orchestration.experimental.core import task
  from tfx.orchestration.experimental.core import task_scheduler
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.utils import json_utils
  from tfx.utils import status
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 2 for calling the ManualTaskScheduler obj's underlying member method code with example usage: obj.schedule() and returns: task_scheduler, task_scheduler