class_docstr: Task generator for executing an async 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","an","async","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 `AsyncPipelineTaskGenerator`.
  
  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.
docstr_tok: ["Constructs","`","AsyncPipelineTaskGenerator","`",".","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","."]
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,
  ):
      """Constructs `AsyncPipelineTaskGenerator`.
  
      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.
      """
      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
  
imports: import sys
  import traceback
  from typing import Callable, List, Optional
  from absl import logging
  from tfx.orchestration import metadata
  from tfx.orchestration import node_proto_view
  from tfx.orchestration.experimental.core import constants
  from tfx.orchestration.experimental.core import event_observer
  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.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 AsyncPipelineTaskGenerator object from inherited base classes: task_gen with example: obj = AsyncPipelineTaskGenerator(mlmd_connection_manager, is_task_id_tracked_fn, service_job_manager)