class_docstr: Tests for the `common_encoders` methods.
class_docstr_tok: ["Tests","for","the","`","common_encoders","`","methods","."]
code: def test_hadamard_quantization(self):
      encoder = common_encoders.hadamard_quantization(8)
      self.assertIsInstance(encoder, core_encoder.Encoder)
  
      params, _ = encoder.get_params(encoder.initial_state())
      encoded_x, _, _ = encoder.encode(tf.constant(1.0), params)
      keys = [
          k
          for k, _ in py_utils.flatten_with_joined_string_paths(
              encoded_x
          )
      ]
      self.assertSameElements(
          [
              "flattened_values/hadamard_values/min_max",
              "flattened_values/hadamard_values/quantized_values/bitpacked_values",
          ],
          keys,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import tensorflow
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.core import core_encoder
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.core import gather_encoder
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.core import simple_encoder
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.encoders import common_encoders
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.utils import py_utils
label_desc: Use image node_id 9 for calling the EncoderLibraryTest obj's underlying member method code with example usage: obj.test_hadamard_quantization() without return types