code: def _join_artifacts(
      entries_map: Mapping[str, Sequence[_Entry]],
      input_keys: Sequence[str],
  ) -> Sequence[
      Tuple[partition_utils.Partition, typing_utils.ArtifactMultiDict]
  ]:
      """Materialize entries map into actual List[ArtifactMultiDict] to be used."""
      accumulated = [(partition_utils.NO_PARTITION, {})]
  
      for input_key in input_keys:
          # Example:
          # entries == [
          #   ({'a': 1}, [Artifact(1)]),
          #   ({'a': 2}, [Artifact(2)]),
          # ]
          entries = entries_map[input_key]
          if not entries:
              return []
  
          # Example:
          # wrapped_entries == [
          #   ({'a': 1}, {'x': [Artifact(1)]}),
          #   ({'a': 2}, {'x': [Artifact(2)]}),
          # ]
          wrapped_entries = [
              (partition, {input_key: artifacts})
              for partition, artifacts in entries
          ]
          accumulated = partition_utils.join(
              accumulated,
              wrapped_entries,
              merge_fn=lambda left, right: {**left, **right},
          )
  
      return accumulated
  
imports: import collections
  from typing import Dict, Iterable, List, Mapping, Sequence, Tuple, TypeVar
  from tfx import types
  from tfx.dsl.compiler import placeholder_utils
  from tfx.orchestration import metadata
  from tfx.orchestration import mlmd_connection_manager
  from tfx.orchestration.portable import data_types
  from tfx.orchestration.portable.input_resolution import exceptions
  from tfx.orchestration.portable.input_resolution import input_graph_resolver
  from tfx.orchestration.portable.input_resolution import partition_utils
  from tfx.orchestration.portable.input_resolution import channel_resolver
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.types import artifact_utils
  from tfx.utils import topsort
  from tfx.utils import typing_utils
  from tfx.utils import governance_utils
label_desc: Use image node_id 6 for calling a global function with example usage: _join_artifacts(entries_map, input_keys) and returns: accumulated, list