class_docstr: Unit tests for clustering lookup algorithms.
class_docstr_tok: ["Unit","tests","for","clustering","lookup","algorithms","."]
docstr: Verifies that get_pulling_indices function works as expected.
docstr_tok: ["Verifies","that","get_pulling_indices","function","works","as","expected","."]
code: def testConvolutionalPullingIndicesPerChannelCA(
      self, data_format, clustering_centroids, weight, expected_output
  ):
      """Verifies that get_pulling_indices function works as expected."""
      clustering_centroids = tf.Variable(
          clustering_centroids, dtype=tf.float32
      )
      clustering_algo = (
          clustering_registry.ClusteringAlgorithmPerChannel(
              clustering_centroids, GradientAggregation.SUM, data_format
          )
      )
      weight = tf.convert_to_tensor(weight)
      pulling_indices = clustering_algo.get_pulling_indices(weight)
  
      # check that pulling_indices has the same shape as weight
      self.assertEqual(pulling_indices.shape, weight.shape)
      self.assertAllEqual(pulling_indices, expected_output)
  
imports: from absl.testing import parameterized
  import tensorflow
  from tensorflow_model_optimization.python.core.clustering.keras import clusterable_layer
  from tensorflow_model_optimization.python.core.clustering.keras import clustering_registry
  from tensorflow_model_optimization.python.core.clustering.keras.cluster_config import GradientAggregation
label_desc: Use image node_id 8 for calling the ClusteringAlgorithmTest obj's underlying member method code with example usage: obj.testConvolutionalPullingIndicesPerChannelCA(data_format, clustering_centroids, weight, expected_output) without return types