class_docstr: Clustering registry to return the implementation for a layer.
docstr: Returns a certain reshape/lookup implementation for a given array.
  
  Args:
    layer: A layer that is being clustered
    weight_name: concrete weight name to be clustered.
    cluster_per_channel: Optional boolean indicating whether to use
      per-channel clustering.
  Returns:
    A concrete implementation of a lookup algorithm.
code: def get_clustering_impl(
      cls, layer, weight_name, cluster_per_channel=False
  ):
      """Returns a certain reshape/lookup implementation for a given array.
  
      Args:
        layer: A layer that is being clustered
        weight_name: concrete weight name to be clustered.
        cluster_per_channel: Optional boolean indicating whether to use
          per-channel clustering.
      Returns:
        A concrete implementation of a lookup algorithm.
      """
  
      # Per-channel clustering is only applied if the layer is a Conv2D,
      # ignored otherwise
      if cluster_per_channel and isinstance(
          layer, tf.keras.layers.Conv2D
      ):
          return ClusteringAlgorithmPerChannel
  
      # Clusterable layer could provide own implementation of get_pulling_indices
      if (
          issubclass(
              layer.__class__, clusterable_layer.ClusterableLayer
          )
          and layer.get_clusterable_algorithm is not None
      ):
          ans = layer.get_clusterable_algorithm(weight_name)
          if ans:
              return ans
      return ClusteringAlgorithm
  
file_path: model-optimization/tensorflow_model_optimization/python/core/clustering/keras/clustering_registry.py
imports: import tensorflow
  from tensorflow_model_optimization.python.core.clustering.keras import clusterable_layer
  from tensorflow_model_optimization.python.core.clustering.keras import clustering_algorithm
label_desc: Use image node_id 1 for calling the ClusteringLookupRegistry obj's underlying member method code with example usage: obj.get_clustering_impl(cls, layer, weight_name, cluster_per_channel) and returns: ClusteringAlgorithm, ClusteringAlgorithmPerChannel, ans