code: def test_subclass_with_inherited_type_spec_raises(self):
      @auto_composite_tensor.auto_composite_tensor(
          omit_kwargs=("parameters",), non_identifying_kwargs=("name",)
      )
      class ParentBijector(
          bijector.Bijector, auto_composite_tensor.AutoCompositeTensor
      ):
          """Minimal specification of a `Bijector`.
  
          We do not subclass `AutoCompositeTensorBijector` since its metaclass
          would make subclasses automatically re-generate their `TypeSpec`.
          """
  
          def __init__(self, a):
              parameters = dict(locals())
              self.a = a
              super(ParentBijector, self).__init__(
                  forward_min_event_ndims=0, parameters=parameters
              )
  
      class ChildBijector(ParentBijector):
          def __init__(self, b):
              self.b = b
              super(ChildBijector, self).__init__(a=b + 1)
  
      b = ChildBijector(b=4)
      with self.assertRaisesRegex(
          ValueError,
          "`ChildBijector` has inherited the `_type_spec` of `ParentBijector`",
      ):
          tf.nest.flatten(b, expand_composites=True)
  
      auto_child_bijector = auto_composite_tensor.auto_composite_tensor(
          ChildBijector
      )  # pylint: disable=invalid-name
      b_ct = auto_child_bijector(b=2)
      self.assertLen(tf.nest.flatten(b_ct, expand_composites=True), 0)
  
imports: import functools
  import os
  from absl import flags
  from absl.testing import parameterized
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
  from tensorflow_probability.python.bijectors import reshape
  from tensorflow_probability.python.bijectors import scale
  from tensorflow_probability.python.bijectors import shift
  from tensorflow_probability.python.bijectors import transform_diagonal
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.experimental.distributions import mvn_precision_factor_linop
  from tensorflow_probability.python.internal import auto_composite_tensor
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.internal import test_util
  from absl.testing import absltest
label_desc: Use image node_id 20 for calling the AutoCompositeTensorTest obj's underlying member method code with example usage: obj.test_subclass_with_inherited_type_spec_raises() without return types