class_docstr: ClusterPreserveQuantizeRegistry is for built-in keras layers.
docstr: Applies cluster-preserve weight quantizer.
  
  Args:
    layer: The layer to check for support.
    quantize_config: quantization config for supporting cluster preservation
    on clustered weights
  Returns:
    The quantize_config with addon cluster preserve weight_quantizer.
code: def apply_cluster_preserve_quantize_config(
      self, layer, quantize_config
  ):
      """Applies cluster-preserve weight quantizer.
  
      Args:
        layer: The layer to check for support.
        quantize_config: quantization config for supporting cluster preservation
        on clustered weights
      Returns:
        The quantize_config with addon cluster preserve weight_quantizer.
      """
      if not self.supports(layer):
          raise ValueError(
              "Layer " + str(layer.__class__) + " is not supported."
          )
  
      # Example: ReLU, Softmax, and AveragePooling2D (without trainable weights)
      # DepthwiseConv2D (cluster_preserve is disabled)
      if self._no_trainable_weights(
          layer
      ) or self._disable_cluster_preserve(layer):
          return quantize_config
  
      # Example: Conv2D, Dense layers
      if (
          quantize_config.__class__.__name__
          in self._LAYERS_CONFIG_MAP[
              layer.__class__
          ].quantize_config_attrs
      ):
          quantize_config.weight_quantizer = self._config_quantizer_map[
              quantize_config.__class__.__name__
          ]
      else:
          raise ValueError(
              "Configuration "
              + str(quantize_config.__class__.__name__)
              + " is not supported for Layer "
              + str(layer.__class__)
              + "."
          )
  
      return quantize_config
  
imports: import logging
  import warnings
  import tensorflow
  from tensorflow_model_optimization.python.core.clustering.keras import cluster_config
  from tensorflow_model_optimization.python.core.clustering.keras import clustering_registry
  from tensorflow_model_optimization.python.core.quantization.keras import quant_ops
  from tensorflow_model_optimization.python.core.quantization.keras import quantizers
  from tensorflow_model_optimization.python.core.quantization.keras.default_8bit import default_8bit_quantize_registry
  from tensorflow_model_optimization.python.core.quantization.keras.default_8bit import default_8bit_quantizers
label_desc: Use image node_id 6 for calling the ClusterPreserveQuantizeRegistry obj's underlying member method code with example usage: obj.apply_cluster_preserve_quantize_config(layer, quantize_config) and returns: quantize_config, quantize_config