code: def testNestedLogicalOps(self):
      channel_11 = Channel(type=_MyType)
      channel_12 = Channel(type=_MyType)
      channel_21 = Channel(type=_MyType)
      channel_22 = Channel(type=_MyType)
      channel_3 = Channel(type=_MyType)
      pred = ph.logical_or(
          ph.logical_and(
              channel_11.future().value >= channel_12.future().value,
              channel_21.future().value < channel_22.future().value,
          ),
          ph.logical_not(channel_3.future().value == "foo"),
      )
  
      channel_to_key_map = {
          channel_11: "channel_11_key",
          channel_12: "channel_12_key",
          channel_21: "channel_21_key",
          channel_22: "channel_22_key",
          channel_3: "channel_3_key",
      }
      actual_pb = channel_utils.encode_placeholder_with_channels(
          pred, lambda channel: channel_to_key_map[channel]
      )
      expected_pb = text_format.Parse(
          """
        operator {
          binary_logical_op {
            lhs {
              operator {
                binary_logical_op {
                  lhs {
                    operator {
                      unary_logical_op {
                        expression {
                          operator {
                            compare_op {
                              lhs {
                                operator {
                                  artifact_value_op {
                                    expression {
                                      operator {
                                        index_op {
                                          expression {
                                            placeholder {
                                              key: "channel_11_key"
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                              rhs {
                                operator {
                                  artifact_value_op {
                                    expression {
                                      operator {
                                        index_op {
                                          expression {
                                            placeholder {
                                              key: "channel_12_key"
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                              op: LESS_THAN
                            }
                          }
                        }
                        op: NOT
                      }
                    }
                  }
                  rhs {
                    operator {
                      compare_op {
                        lhs {
                          operator {
                            artifact_value_op {
                              expression {
                                operator {
                                  index_op {
                                    expression {
                                      placeholder {
                                        key: "channel_21_key"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                        rhs {
                          operator {
                            artifact_value_op {
                              expression {
                                operator {
                                  index_op {
                                    expression {
                                      placeholder {
                                        key: "channel_22_key"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                        op: LESS_THAN
                      }
                    }
                  }
                  op: AND
                }
              }
            }
            rhs {
              operator {
                unary_logical_op {
                  expression {
                    operator {
                      compare_op {
                        lhs {
                          operator {
                            artifact_value_op {
                              expression {
                                operator {
                                  index_op {
                                    expression {
                                      placeholder {
                                        key: "channel_3_key"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                        rhs {
                          value {
                            string_value: "foo"
                          }
                        }
                        op: EQUAL
                      }
                    }
                  }
                  op: NOT
                }
              }
            }
            op: OR
          }
        }
      """,
          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 10 for calling the PredicateTest obj's underlying member method code with example usage: obj.testNestedLogicalOps() without return types