code: def testResolveSingleChannel_AllContexts(self):
      p = self.put_context("pipeline", "my-pipeline")
      r1 = self.put_context("pipeline_run", "run-001")
      r2 = self.put_context("pipeline_run", "run-002")
      self.put_context("hahaha", "i-am-a-troll")
      e1 = self.put_artifact("Examples")
      e2 = self.put_artifact("Examples")
      self.put_execution(
          "ExampleGen",
          inputs={},
          outputs={"examples": [e1]},
          contexts=[p, r1],
      )
      self.put_execution(
          "ExampleGen",
          inputs={},
          outputs={"examples": [e2]},
          contexts=[p, r2],
      )
  
      with self.subTest("Pipeline"):
          ch = self.make_channel_spec(
              """
          context_queries {
            type {
              name: "pipeline"
            }
            name {
              field_value {
                string_value: "my-pipeline"
              }
            }
          }
          artifact_query {
            type {
              name: "Examples"
            }
          }
        """
          )
          resolved = channel_resolver.resolve_single_channel(
              self.mlmd_handle, ch
          )
          self.assertLen(resolved, 2)
          self.assertEqual({a.id for a in resolved}, {e1.id, e2.id})
  
      with self.subTest("Pipeline + PipelineRun"):
          ch = self.make_channel_spec(
              """
          context_queries {
            type {
              name: "pipeline"
            }
            name {
              field_value {
                string_value: "my-pipeline"
              }
            }
          }
          context_queries {
            type {
              name: "pipeline_run"
            }
            name {
              field_value {
                string_value: "run-001"
              }
            }
          }
          artifact_query {
            type {
              name: "Examples"
            }
          }
        """
          )
          resolved = channel_resolver.resolve_single_channel(
              self.mlmd_handle, ch
          )
          self.assertLen(resolved, 1)
          self.assertEqual(resolved[0].id, e1.id)
  
      with self.subTest("Pipeline + PipelineRun + Else"):
          ch = self.make_channel_spec(
              """
          context_queries {
            type {
              name: "pipeline"
            }
            name {
              field_value {
                string_value: "my-pipeline"
              }
            }
          }
          context_queries {
            type {
              name: "pipeline_run"
            }
            name {
              field_value {
                string_value: "run-001"
              }
            }
          }
          context_queries {
            type {
              name: "hahaha"
            }
            name {
              field_value {
                string_value: "i-am-a-troll"
              }
            }
          }
          artifact_query {
            type {
              name: "Examples"
            }
          }
        """
          )
          resolved = channel_resolver.resolve_single_channel(
              self.mlmd_handle, ch
          )
          self.assertEmpty(resolved)
  
file_path: tfx/tfx/orchestration/portable/input_resolution/channel_resolver_test.py
imports: import tensorflow
  from tfx.orchestration.portable.input_resolution import channel_resolver
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.utils import test_case_utils
  from google.protobuf import text_format
label_desc: Use image node_id 5 for calling the ChannelResolverTest obj's underlying member method code with example usage: obj.testResolveSingleChannel_AllContexts() without return types