keras/src/legacy/saving/serialization.py/SharedObjectLoadingScope/__exit__
class SharedObjectLoadingScope:    def __exit__(self, *args, **kwargs):
        global SHARED_OBJECT_LOADING
        SHARED_OBJECT_LOADING.scope = NoopLoadingScope()