code: def _get_executions_by_all_contexts(
      store: mlmd.MetadataStore,
      contexts: Sequence[metadata_store_pb2.Context],
  ) -> List[metadata_store_pb2.Execution]:
      """Get executions bound with ALL given contexts."""
      if not contexts:
          return []
      executions_by_id = {}
      valid_ids = None
      for context in contexts:
          executions = store.get_executions_by_context(context.id)
          if valid_ids is None:
              valid_ids = {a.id for a in executions}
          else:
              valid_ids.intersection_update({a.id for a in executions})
          executions_by_id.update({a.id: a for a in executions})
      return [executions_by_id[i] for i in valid_ids]
  
file_path: tfx/tfx/orchestration/portable/input_resolution/channel_resolver.py
imports: from typing import List, Optional, Sequence, Tuple
  from absl import logging
  from tfx import types
  from tfx.orchestration import mlmd_connection_manager
  from tfx.orchestration.portable.mlmd import event_lib
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.types import artifact_utils
  import ml_metadata
  from ml_metadata import errors
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: _get_executions_by_all_contexts(store, contexts) and returns: unknown, list