code: def resolve_single_channel(
      handle_like: mlmd_cm.HandleLike,
      channel: pipeline_pb2.InputSpec.Channel,
  ) -> List[types.Artifact]:
      """Evaluate a single InputSpec.Channel."""
      store = mlmd_cm.get_handle(handle_like).store
      contexts = []
      for context_query in channel.context_queries:
          maybe_context = _get_context_from_context_query(
              store, context_query
          )
          if maybe_context is None:
              # If the context does not exist, it means no artifacts satisfy the given
              # context query. Returns empty.
              return []
          else:
              contexts.append(maybe_context)
      executions = _get_executions_by_all_contexts(store, contexts)
      if not executions:
          return []
      artifacts = _get_output_artifacts(
          store, executions, channel.output_key
      )
      if not artifacts:
          return []
      artifacts, artifact_type = _filter_by_artifact_query(
          store, artifacts, channel.artifact_query
      )
  
      return artifact_utils.deserialize_artifacts(
          artifact_type, artifacts
      )
  
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 5 for calling a global function with example usage: resolve_single_channel(handle_like, channel) and returns: artifact_utils, list, list, list