code: def testPipelineKey(self):
      # This happens if PipelineKey() is used on a pipeline with out a dictionary
      # output, or the key is not in the output_type dict.
      pipeline_inst = MockPipeline()
      pipeline_key = pipeline_inst["dataset_1"]
      self.assertTrue(isinstance(pipeline_key, pipeline.PipelineKey))
      self.assertEqual(pipeline_key.key, "dataset_1")
      self.assertEqual(pipeline_key.unit, pipeline_inst)
      self.assertEqual(pipeline_key.output_type, MockStringProto)
      with self.assertRaises(KeyError):
          _ = pipeline_inst["abc"]
  
      class TestPipeline(pipeline.Pipeline):
          def __init__(self):
              super(TestPipeline, self).__init__(str, str)
  
          def transform(self, input_object):
              pass
  
      pipeline_inst = TestPipeline()
      with self.assertRaises(KeyError):
          _ = pipeline_inst["abc"]
  
      with self.assertRaises(ValueError):
          _ = pipeline.PipelineKey(1234, "abc")
  
imports: import os
  from absl.testing import absltest
  from magenta.common import testing_lib
  from magenta.pipelines import pipeline
  from magenta.pipelines import statistics
  import tensorflow.compat.v1
label_desc: Use image node_id 6 for calling the PipelineTest obj's underlying member method code with example usage: obj.testPipelineKey() without return types