class_docstr: Task generator for executing a sync pipeline.
  
  Calling `generate` is not thread-safe. Concurrent calls to `generate` should
  be explicitly serialized. Since MLMD may be updated upon call to `generate`,
  it's also not safe to call `generate` on different instances of this class
  where the instances refer to the same MLMD db and the same pipeline IR.
class_docstr_tok: ["Task","generator","for","executing","a","sync","pipeline",".","Calling","`","generate","`","is","not","thread-safe",".","Concurrent","calls","to","`","generate","`","should","be","explicitly","serialized",".","Since","MLMD","may","be","updated","upon","call","to","`","generate","`",",","it","'s","also","not","safe","to","call","`","generate","`","on","different","instances","of","this","class","where","the","instances","refer","to","the","same","MLMD","db","and","the","same","pipeline","IR","."]
docstr: Constructs `SyncPipelineTaskGenerator`.
  
  Args:
    mlmd_connection_manager: A `MLMDConnectionManager` instance to manager
      multiple mlmd connections.
    is_task_id_tracked_fn: A callable that returns `True` if a task_id is
      tracked by the task queue.
    service_job_manager: Used for handling service nodes in the pipeline.
    fail_fast: If `True`, pipeline run is aborted immediately if any node
      fails. If `False`, pipeline run is only aborted when no further progress
      can be made due to node failures.
code: def __init__(
      self,
      mlmd_connection_manager: mlmd_cm.MLMDConnectionManager,
      is_task_id_tracked_fn: Callable[[task_lib.TaskId], bool],
      service_job_manager: service_jobs.ServiceJobManager,
      fail_fast: bool = False,
  ):
      """Constructs `SyncPipelineTaskGenerator`.
  
      Args:
        mlmd_connection_manager: A `MLMDConnectionManager` instance to manager
          multiple mlmd connections.
        is_task_id_tracked_fn: A callable that returns `True` if a task_id is
          tracked by the task queue.
        service_job_manager: Used for handling service nodes in the pipeline.
        fail_fast: If `True`, pipeline run is aborted immediately if any node
          fails. If `False`, pipeline run is only aborted when no further progress
          can be made due to node failures.
      """
      self._mlmd_connection_manager = mlmd_connection_manager
      self._is_task_id_tracked_fn = is_task_id_tracked_fn
      self._service_job_manager = service_job_manager
      self._fail_fast = fail_fast
  
imports: import collections
  import textwrap
  from typing import Callable, Dict, List, Mapping, Optional, Set
  from absl import logging
  from tfx.orchestration import node_proto_view
  from tfx.orchestration.experimental.core import mlmd_state
  from tfx.orchestration.experimental.core import pipeline_state
  from tfx.orchestration.experimental.core import service_jobs
  from tfx.orchestration.experimental.core import task
  from tfx.orchestration.experimental.core import task_gen
  from tfx.orchestration.experimental.core import task_gen_utils
  from tfx.orchestration import mlmd_connection_manager
  from tfx.orchestration.portable.input_resolution import exceptions
  from tfx.orchestration.portable.mlmd import execution_lib
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.utils import status
  from tfx.utils import topsort
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 1 to create a new SyncPipelineTaskGenerator object from inherited base classes: task_gen with example: obj = SyncPipelineTaskGenerator(mlmd_connection_manager, is_task_id_tracked_fn, service_job_manager, fail_fast)