code: def testPipelineTypeGenericAnnotation(self):
      # Error: type hint whose parameter is not a primitive type
      with self.assertRaisesRegex(
          ValueError, "T to be `beam.Pipeline`"
      ):
          _ = annotations._PipelineTypeGeneric[artifact.Artifact]
      with self.assertRaisesRegex(
          ValueError, "T to be `beam.Pipeline`"
      ):
          _ = annotations._PipelineTypeGeneric[object]
      # pytype: disable=unsupported-operands
      with self.assertRaisesRegex(
          ValueError, "T to be `beam.Pipeline`"
      ):
          _ = annotations._PipelineTypeGeneric[123]
      with self.assertRaisesRegex(
          ValueError, "T to be `beam.Pipeline`"
      ):
          _ = annotations._PipelineTypeGeneric["string"]
      # pytype: enable=unsupported-operands
  
      # OK.
      _ = annotations._PipelineTypeGeneric[beam.Pipeline]
  
file_path: tfx/tfx/dsl/component/experimental/annotations_test.py
imports: from typing import Dict
  import apache_beam
  import tensorflow
  from tfx.dsl.component.experimental import annotations
  from tfx.types import artifact
  from tfx.types import standard_artifacts
  from tfx.types import value_artifact
label_desc: Use image node_id 4 for calling the AnnotationsTest obj's underlying member method code with example usage: obj.testPipelineTypeGenericAnnotation() without return types