class_docstr: Unit tests for the clustering_centroids module.
class_docstr_tok: ["Unit","tests","for","the","clustering_centroids","module","."]
docstr: Verifies that the centroid initializer factory method raises an exception
  when invoked with an wrong type of data_format.
docstr_tok: ["Verifies","that","the","centroid","initializer","factory","method","raises","an","exception","when","invoked","with","an","wrong","type","of","data_format","."]
code: def testThrowsValueErrorForWrongDataFormat(self):
      """Verifies that the centroid initializer factory method raises an exception
      when invoked with an wrong type of data_format."""
      f = self.factory.get_centroid_initializer(
          "CentroidInitialization.KMEANS_PLUS_PLUS"
      )
      with self.assertRaises(ValueError):
          f([1, 2], 2, True, "NCHW")
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_model_optimization.python.core.clustering.keras import cluster_config
  from tensorflow_model_optimization.python.core.clustering.keras import clustering_centroids
label_desc: Use image node_id 6 for calling the ClusteringCentroidsTest obj's underlying member method code with example usage: obj.testThrowsValueErrorForWrongDataFormat() without return types