keras/src/legacy/saving/serialization.py/DisableSharedObjectScope/__exit__
class DisableSharedObjectScope:    def __exit__(self, *args, **kwargs):
        SHARED_OBJECT_DISABLED.disabled = False
        SHARED_OBJECT_LOADING.scope = self._orig_loading_scope
        SHARED_OBJECT_SAVING.scope = self._orig_saving_scope