class_docstr: Unit tests for the cluster_wrapper module.
docstr: Verifies that, for any number of clusters and any centroid initialization  method, the number of unique weight values after stripping is always less or equal to number_of_clusters.
docstr_tok: ["Verifies","that",",","for","any","number","of","clusters","and","any","centroid","initialization","method",",","the","number","of","unique","weight","values","after","stripping","is","always","less","or","equal","to","number_of_clusters","."]
code: def testValuesAreClusteredAfterStripping(
      self, number_of_clusters, cluster_centroids_init
  ):
      """Verifies that, for any number of clusters and any centroid initialization  method, the number of unique weight values after stripping is always less or equal to number_of_clusters."""
      original_model = tf.keras.Sequential(
          [
              layers.Dense(32, input_shape=(10,)),
          ]
      )
      self.assertGreater(
          len(
              set(
                  original_model.get_weights()[0]
                  .reshape(
                      -1,
                  )
                  .tolist()
              )
          ),
          number_of_clusters,
      )
      clustered_model = cluster.cluster_weights(
          original_model,
          number_of_clusters=number_of_clusters,
          cluster_centroids_init=cluster_centroids_init,
      )
      stripped_model = cluster.strip_clustering(clustered_model)
      weights_as_list = (
          stripped_model.get_weights()[0]
          .reshape(
              -1,
          )
          .tolist()
      )
      unique_weights = set(weights_as_list)
      # Make sure numbers match
      self.assertLessEqual(len(unique_weights), number_of_clusters)
  
      # Make sure that the stripped layer is the Dense one
      self.assertIsInstance(stripped_model.layers[0], layers.Dense)
  
imports: import itertools
  import os
  import tempfile
  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
  from tensorflow_model_optimization.python.core.clustering.keras import cluster_wrapper
  from tensorflow_model_optimization.python.core.clustering.keras import clusterable_layer
label_desc: Use image node_id 10 for calling the ClusterWeightsTest obj's underlying member method code with example usage: obj.testValuesAreClusteredAfterStripping(number_of_clusters, cluster_centroids_init) without return types