code: def testBuiltInTypeSpecCodecInvalidInputs(self):
      class Foo:
          pass
  
      class Bar(internal.TypeSpec):
          pass
  
      with self.assertRaisesRegex(
          ValueError, "The type '(.*?)' does not subclass tf.TypeSpec."
      ):
          nested_structure_coder.BuiltInTypeSpecCodec(Foo, 0)
      with self.assertRaisesRegex(
          ValueError,
          "The type '(.*?)' already has an instantiated codec.",
      ):
          nested_structure_coder.BuiltInTypeSpecCodec(
              dataset_ops.DatasetSpec,
              struct_pb2.TypeSpecProto.DATA_DATASET_SPEC,
          )
      with self.assertRaisesRegex(
          ValueError, "The proto value '(.*?)' is already registered."
      ):
          nested_structure_coder.BuiltInTypeSpecCodec(
              Bar, struct_pb2.TypeSpecProto.DATA_DATASET_SPEC
          )
      with self.assertRaisesRegex(
          ValueError, "The proto value '(.*?)' is invalid."
      ):
          nested_structure_coder.BuiltInTypeSpecCodec(Bar, 0)
      with self.assertRaisesRegex(
          ValueError, "The proto value '(.*?)' is invalid."
      ):
          nested_structure_coder.BuiltInTypeSpecCodec(Bar, 11)
      with self.assertRaisesRegex(
          ValueError, "The proto value '(.*?)' is invalid."
      ):
          nested_structure_coder.BuiltInTypeSpecCodec(Bar, 12)
      with self.assertRaisesRegex(
          ValueError, "The proto value '(.*?)' is invalid."
      ):
          nested_structure_coder.BuiltInTypeSpecCodec(Bar, 13)
  
imports: import collections
  import typing
  import warnings
  import numpy
  from google.protobuf import text_format
  from tensorflow.core.protobuf import struct_pb2
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import extension_type
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.framework import test_util
  from tensorflow.python.framework import type_spec
  from tensorflow.python.framework import type_spec_registry
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.platform import test
  from tensorflow.python.saved_model import nested_structure_coder
  from tensorflow.python.types import internal
label_desc: Use image node_id 25 for calling the NestedStructureCoderTest obj's underlying member method code with example usage: obj.testBuiltInTypeSpecCodecInvalidInputs() without return types