class_docstr: Exposes custom classes/functions to Keras deserialization internals.
  
  Under a scope `with custom_object_scope(objects_dict)`, Keras methods such
  as `keras.models.load_model()` or
  `keras.models.model_from_config()` will be able to deserialize any
  custom object referenced by a saved config (e.g. a custom layer or metric).
  
  Example:
  
  Consider a custom regularizer `my_regularizer`:
  
  ```python
  layer = Dense(3, kernel_regularizer=my_regularizer)
  # Config contains a reference to `my_regularizer`
  config = layer.get_config()
  ...
  # Later:
  with custom_object_scope({'my_regularizer': my_regularizer}):
      layer = Dense.from_config(config)
  ```
  
  Args:
      custom_objects: Dictionary of `{name: object}` pairs.
code: def __enter__(self):
      self.backup = global_state.get_global_attribute(
          "custom_objects_scope_dict", {}
      ).copy()
      global_state.set_global_attribute(
          "custom_objects_scope_dict", self.custom_objects.copy()
      )
      return self
  
file_path: keras/keras/saving/object_registration.py
imports: import inspect
  from keras.api_export import keras_export
  from keras.backend.common import global_state
label_desc: Use image node_id 2 for calling the CustomObjectScope obj's underlying member method code with example usage: obj.__enter__() and returns: self