code: def testEncodeWithKeys(self):
      channel_1 = Channel(type=_MyType)
      channel_2 = Channel(type=_MyType)
      pred = channel_1.future().value > channel_2.future().value
      channel_to_key_map = {
          channel_1: "channel_1_key",
          channel_2: "channel_2_key",
      }
      actual_pb = channel_utils.encode_placeholder_with_channels(
          pred, lambda channel: channel_to_key_map[channel]
      )
      expected_pb = text_format.Parse(
          """
        operator {
          compare_op {
            lhs {
              operator {
                artifact_value_op {
                  expression {
                    operator {
                      index_op {
                        expression {
                          placeholder {
                            key: "channel_1_key"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
            rhs {
              operator {
                artifact_value_op {
                  expression {
                    operator {
                      index_op {
                        expression {
                          placeholder {
                            key: "channel_2_key"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
            op: GREATER_THAN
          }
        }
      """,
          placeholder_pb2.PlaceholderExpression(),
      )
      self.assertProtoEquals(actual_pb, expected_pb)
  
imports: import os
  from typing import Type, TypeVar
  from absl.testing import parameterized
  import tensorflow
  from tfx.dsl.placeholder import placeholder
  from tfx.proto.orchestration import placeholder_pb2
  from tfx.types import channel_utils
  from tfx.types import standard_artifacts
  from tfx.types.artifact import Artifact
  from tfx.types.artifact import Property
  from tfx.types.artifact import PropertyType
  from tfx.types.channel import Channel
  from google.protobuf import message
  from google.protobuf import text_format
label_desc: Use image node_id 4 for calling the PredicateTest obj's underlying member method code with example usage: obj.testEncodeWithKeys() without return types