code: def _get_number_of_unique_weights(
      stripped_model, layer_nr, weight_name
  ):
      layer = stripped_model.layers[layer_nr]
      weight = getattr(layer, weight_name)
      weights_as_list = (
          weight.numpy()
          .reshape(
              -1,
          )
          .tolist()
      )
      nr_of_unique_weights = len(set(weights_as_list))
  
      return nr_of_unique_weights
  
file_path: model-optimization/tensorflow_model_optimization/python/core/clustering/keras/mnist_clustering_test.py
imports: from absl.testing import parameterized
  import tensorflow
  from tensorflow_model_optimization.python.core.clustering.keras import cluster
  from tensorflow_model_optimization.python.core.clustering.keras import cluster_config
label_desc: Use image node_id 5 for calling a global function with example usage: _get_number_of_unique_weights(stripped_model, layer_nr, weight_name) and returns: nr_of_unique_weights