code: def quantize_scope(*args):
      """Scope which can be used to deserialize quantized Keras models and layers.
  
      Under `quantize_scope`, Keras methods such as `tf.keras.load_model` and
      `tf.keras.models.model_from_config` will be able to deserialize Keras models
      and layers which contain quantization classes such as `QuantizeConfig`
      and `Quantizer`.
  
      Example:
  
      ```python
      tf.keras.models.save_model(quantized_model, keras_file)
  
      with quantize_scope():
        loaded_model = tf.keras.models.load_model(keras_file)
  
      # If your quantized model uses custom objects such as a specific `Quantizer`,
      # you can pass them to quantize_scope to deserialize your model.
      with quantize_scope({'FixedRangeQuantizer', FixedRangeQuantizer}
        loaded_model = tf.keras.models.load_model(keras_file)
      ```
  
      For further understanding, see `tf.keras.utils.custom_object_scope`.
  
      Args:
        *args: Variable length list of dictionaries of `{name, class}` pairs to add
          to the scope created by this method.
  
      Returns:
        Object of type `CustomObjectScope` with quantization objects included.
      """
      quantization_objects = {
          "QuantizeAnnotate": quantize_annotate_mod.QuantizeAnnotate,
          "QuantizeAwareActivation": quantize_aware_activation.QuantizeAwareActivation,
          "NoOpActivation": quantize_aware_activation.NoOpActivation,
          "QuantizeWrapper": quantize_wrapper.QuantizeWrapper,
          "QuantizeWrapperV2": quantize_wrapper.QuantizeWrapperV2,
          "QuantizeLayer": quantize_layer.QuantizeLayer,
          "OutputOnlyConfig": quantize_config_mod.OutputOnlyConfig,
          "FixedQuantizeConfig": quantize_config_mod.FixedQuantizeConfig,
      }
      quantization_objects.update(
          default_8bit_quantize_registry._types_dict()
      )  # pylint: disable=protected-access
      quantization_objects.update(
          default_n_bit_quantize_registry._types_dict()
      )  # pylint: disable=protected-access
      quantization_objects.update(
          quantizers._types_dict()
      )  # pylint: disable=protected-access
  
      return tf.keras.utils.custom_object_scope(
          *(args + (quantization_objects,))
      )
  
imports: import warnings
  import tensorflow
  from tensorflow_model_optimization.python.core.keras import metrics
  from tensorflow_model_optimization.python.core.quantization.keras import quantize_annotate
  from tensorflow_model_optimization.python.core.quantization.keras import quantize_aware_activation
  from tensorflow_model_optimization.python.core.quantization.keras import quantize_config
  from tensorflow_model_optimization.python.core.quantization.keras import quantize_layer
  from tensorflow_model_optimization.python.core.quantization.keras import quantize_wrapper
  from tensorflow_model_optimization.python.core.quantization.keras import quantizers
  from tensorflow_model_optimization.python.core.quantization.keras import utils
  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_quantize_scheme
  from tensorflow_model_optimization.python.core.quantization.keras.experimental.default_n_bit import default_n_bit_quantize_registry
label_desc: Use image node_id 1 for calling a global function with example usage: quantize_scope() and returns: tf