code: def test_more_than_two_ndims_raises(self, dims):
      x = tf.random.normal(dims)
      stage = self.default_encoding_stage()
      params, _ = stage.get_params()
      with self.assertRaisesRegexp(ValueError, "must be 1 or 2."):
          stage.encode(x, params)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.stages.research import kashin
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.testing import test_utils
label_desc: Use image node_id 15 for calling the KashinHadamardEncodingStageTest obj's underlying member method code with example usage: obj.test_more_than_two_ndims_raises(dims) without return types