class_docstr: Unit tests for the clustering_centroids module.
class_docstr_tok: ["Unit","tests","for","the","clustering_centroids","module","."]
code: def testDensityBasedClusterCentroids(
      self, weights, number_of_clusters, centroids
  ):
      dbci = clustering_centroids.DensityBasedCentroidsInitialisation(
          weights, number_of_clusters
      )
      calc_centroids = K.batch_get_value(
          [dbci.get_cluster_centroids()]
      )[0]
      self.assertSequenceAlmostEqual(
          centroids, calc_centroids, places=4
      )
  
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 13 for calling the ClusteringCentroidsTest obj's underlying member method code with example usage: obj.testDensityBasedClusterCentroids(weights, number_of_clusters, centroids) without return types