code: def testRaisesError_Unsupported_QuantizeConfigWithLayer(self):
      with self.assertRaises(
          ValueError,
          msg="Unregistered QuantizeConfigs should raise error.",
      ):
          self.prune_preserve_quantize_registry.apply_sparsity_preserve_quantize_config(
              self.layer_conv2d, self.CustomQuantizeConfig
          )
  
      with self.assertRaises(
          ValueError, msg="Unregistered layers should raise error."
      ):
          self.prune_preserve_quantize_registry.apply_sparsity_preserve_quantize_config(
              self.layer_custom, self.CustomQuantizeConfig
          )
  
file_path: model-optimization/tensorflow_model_optimization/python/core/quantization/keras/collab_opts/prune_preserve/prune_preserve_quantize_registry_test.py
imports: import tensorflow
  from tensorflow_model_optimization.python.core.quantization.keras import quantize_config
  from tensorflow_model_optimization.python.core.quantization.keras.collab_opts.prune_preserve import prune_preserve_quantize_registry
  from tensorflow_model_optimization.python.core.quantization.keras.default_8bit import default_8bit_quantize_registry
  from tensorflow_model_optimization.python.core.sparsity.keras import prune_registry
label_desc: Use image node_id 5 for calling the PrunePreserveQuantizeRegistryTest obj's underlying member method code with example usage: obj.testRaisesError_Unsupported_QuantizeConfigWithLayer() without return types