code: def _get_number_of_unique_weights(
      self, stripped_model, layer_nr, weight_name
  ):
      layer = stripped_model.layers[layer_nr]
      if isinstance(layer, quantize.quantize_wrapper.QuantizeWrapper):
          for weight_item in layer.trainable_weights:
              if weight_name in weight_item.name:
                  weight = weight_item
      else:
          weight = getattr(layer, weight_name)
      weights_as_list = weight.numpy().flatten()
      nr_of_unique_weights = len(set(weights_as_list))
      return nr_of_unique_weights
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_model_optimization.python.core.clustering.keras import cluster
  from tensorflow_model_optimization.python.core.clustering.keras import cluster_config
  from tensorflow_model_optimization.python.core.clustering.keras.experimental import cluster
  from tensorflow_model_optimization.python.core.quantization.keras import quantize
  from tensorflow_model_optimization.python.core.quantization.keras.collab_opts.cluster_preserve import default_8bit_cluster_preserve_quantize_scheme
  from tensorflow_model_optimization.python.core.quantization.keras.collab_opts.cluster_preserve.cluster_utils import strip_clustering_cqat
label_desc: Use image node_id 3 for calling the ClusterPreserveIntegrationTest obj's underlying member method code with example usage: obj._get_number_of_unique_weights(stripped_model, layer_nr, weight_name) and returns: nr_of_unique_weights