code: def build_channel_to_key_fn(implicit_keys_map):
      """Builds a function that returns the key of a channel for consumer node."""
  
      def channel_to_key_fn(channel: types.BaseChannel) -> str:
          implicit_key = implicit_channel_key(channel)
          if implicit_key in implicit_keys_map:
              return implicit_keys_map[implicit_key]
          return implicit_key
  
      return channel_to_key_fn
  
imports: from typing import cast, List, Optional, Sequence, Tuple, Type, Union, Dict, Any, Set
  from tfx import types
  from tfx.dsl.compiler import constants
  from tfx.dsl.components.base import base_node
  from tfx.dsl.components.common import importer
  from tfx.dsl.components.common import resolver
  from tfx.dsl.context_managers import dsl_context_registry
  from tfx.dsl.placeholder import placeholder
  from tfx.orchestration import data_types_utils
  from tfx.orchestration import pipeline
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.types import channel
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 19 for calling a global function with example usage: build_channel_to_key_fn(implicit_keys_map) and returns: channel_to_key_fn, implicit_key, implicit_keys_map