code: def testShapeChecking(self, constructor, kwargs):
      vqvae_module = constructor(**kwargs)
      wrong_shape_input = np.random.randn(
          100, kwargs["embedding_dim"] * 2
      )
      with self.assertRaisesRegex(
          tf.errors.InvalidArgumentError, "but the requested shape has"
      ):
          vqvae_module(
              tf.constant(wrong_shape_input.astype(np.float32)),
              is_training=False,
          )
  
file_path: sonnet/sonnet/src/nets/vqvae_test.py
imports: from absl.testing import parameterized
  import numpy
  from sonnet.src import test_utils
  from sonnet.src.nets import vqvae
  import tensorflow
  import tree
label_desc: Use image node_id 2 for calling the VqvaeTest obj's underlying member method code with example usage: obj.testShapeChecking(constructor, kwargs) without return types