code: def testCheckName(self):
      # Should pass the check with the legal name.
      pipeline_builder._check_name(_VALID_NAME)
      # Should fail the check with the illegal name.
      with self.assertRaisesRegex(
          ValueError, "User provided pipeline name"
      ):
          pipeline_builder._check_name(_BAD_NAME)
  
imports: from kfp.pipeline_spec import pipeline_spec_pb2
  import tensorflow
  from tfx.orchestration.kubeflow import decorators
  from tfx.orchestration.kubeflow.v2 import pipeline_builder
  from tfx.orchestration.kubeflow.v2 import test_utils
label_desc: Use image node_id 1 for calling the PipelineBuilderTest obj's underlying member method code with example usage: obj.testCheckName() without return types