code: def testQuantizesWeightsInLayer(self):
      weights = lambda shape, dtype: np.array([[-1.0, 0.0], [0.0, 1.0]])
      layer = keras.layers.Dense(2, kernel_initializer=weights)
  
      model = keras.Sequential(
          [
              QuantizeWrapper(
                  layer=layer,
                  quantize_config=self.quantize_registry.get_quantize_config(
                      layer
                  ),
                  input_shape=(2,),
              )
          ]
      )
  
      # FakeQuant([-1.0, 1.0]) = [-0.9882355, 0.9882355]
      # Obtained from tf.fake_quant_with_min_max_vars
      self.assertAllClose(
          np.array([[-0.9882355, 0.9882355]]),
          # Inputs are all ones, so result comes directly from weights.
          model.predict(np.ones((1, 2))),
      )
  
file_path: model-optimization/tensorflow_model_optimization/python/core/quantization/keras/quantize_wrapper_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_model_optimization.python.core.quantization.keras import quantize_aware_activation
  from tensorflow_model_optimization.python.core.quantization.keras import quantize_wrapper
  from tensorflow_model_optimization.python.core.quantization.keras.default_8bit import default_8bit_quantize_registry
label_desc: Use image node_id 2 for calling the QuantizeWrapperTest obj's underlying member method code with example usage: obj.testQuantizesWeightsInLayer() without return types