def METHOD_NAME():
    current_storage_scope = get_active_settings().scopes.get(PluginScope.STORAGE)
    get_active_settings().scopes[PluginScope.STORAGE] = [f"{MemoryStorage.get_path()}"]
    try:
        yield MemoryStorage
    finally:
        if (
            current_storage_scope is None
            and PluginScope.STORAGE in get_active_settings().scopes
        ):
            del get_active_settings().scopes[PluginScope.STORAGE]
        else:
            get_active_settings().scopes[PluginScope.STORAGE] = current_storage_scope