class_docstr: Generator implementation class for SyncPipelineTaskGenerator.
class_docstr_tok: ["Generator","implementation","class","for","SyncPipelineTaskGenerator","."]
docstr: Returns `True` if the node's Trigger Strategy is satisfied.
code: def _trigger_strategy_satisfied(
      self,
      node: node_proto_view.NodeProtoView,
      successful_node_ids: Set[str],
      failed_nodes_dict: Dict[str, status_lib.Status],
      lazily_evaluated_node_ids: Set[str],
      unrunnable_node_ids: Set[str],
  ) -> bool:
      """Returns `True` if the node's Trigger Strategy is satisfied."""
      if node.execution_options.strategy in (
          pipeline_pb2.NodeExecutionOptions.ALL_UPSTREAM_NODES_COMPLETED,
          pipeline_pb2.NodeExecutionOptions.LAZILY_ALL_UPSTREAM_NODES_COMPLETED,
      ):
          node_trigger_strategy_satisfied = (
              self._upstream_nodes_completed(
                  node, successful_node_ids, failed_nodes_dict
              )
          )
      elif node.execution_options.strategy in (
          pipeline_pb2.NodeExecutionOptions.TRIGGER_STRATEGY_UNSPECIFIED,
          pipeline_pb2.NodeExecutionOptions.ALL_UPSTREAM_NODES_SUCCEEDED,
          pipeline_pb2.NodeExecutionOptions.LAZILY_ALL_UPSTREAM_NODES_SUCCEEDED,
      ):
          node_trigger_strategy_satisfied = (
              self._upstream_nodes_successful(node, successful_node_ids)
          )
      elif (
          node.execution_options.strategy
          == pipeline_pb2.NodeExecutionOptions.LIFETIME_END_WHEN_SUBGRAPH_CANNOT_PROGRESS
      ):
          node_trigger_strategy_satisfied = (
              self._lifetime_end_when_subgraph_cannot_progress(
                  node,
                  successful_node_ids,
                  unrunnable_node_ids,
                  failed_nodes_dict,
              )
          )
      else:
          raise NotImplementedError(
              "Unrecognized node triggering strategy: %s"
              % pipeline_pb2.NodeExecutionOptions.TriggerStrategy.Name(
                  node.execution_options.strategy
              )
          )
  
      if not node_trigger_strategy_satisfied:
          return node_trigger_strategy_satisfied
  
      # Only check that downstream nodes are otherwise satisfied if there are any
      # downstream nodes, otherwise we should just treat the node as normal.
      if (
          node.execution_options.strategy in _LAZY_TRIGGER_STRATEGIES
          and node.downstream_nodes
      ):
          any_downstream_node_otherwise_ready = False
          successful_or_lazy_node_ids = (
              successful_node_ids | lazily_evaluated_node_ids
          )
          for downstream_node in node.downstream_nodes:
              downstream_trigger = self._trigger_strategy_satisfied(
                  self._node_proto_view_by_node_id[downstream_node],
                  successful_or_lazy_node_ids,
                  failed_nodes_dict,
                  lazily_evaluated_node_ids,
                  unrunnable_node_ids,
              )
              any_downstream_node_otherwise_ready |= downstream_trigger
              if any_downstream_node_otherwise_ready:
                  break
          node_trigger_strategy_satisfied &= (
              any_downstream_node_otherwise_ready
          )
      return node_trigger_strategy_satisfied
  
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 13 for calling the _Generator obj's underlying member method code with example usage: obj._trigger_strategy_satisfied(node, successful_node_ids, failed_nodes_dict, lazily_evaluated_node_ids, unrunnable_node_ids) and returns: node_trigger_strategy_satisfied, node_trigger_strategy_satisfied