def get_store(path='oauth_provider.store.db.ModelStore'):
    """
    Load the oauth store. Should not be called directly unless testing.
    """
    path = getattr(settings, 'OAUTH_STORE', path)

    try:
        module, attr = path.rsplit('.', 1)
        store_class = getattr(import_module(module), attr)
    except ValueError:
        raise ImproperlyConfigured('Invalid oauth store string: "%s"' % path)
    except ImportError, e:
        raise ImproperlyConfigured('Error loading oauth store module "%s": "%s"' % (module, e))
    except AttributeError:
        raise ImproperlyConfigured('Module "%s" does not define an oauth store named "%s"' % (module, attr))

    return store_class()
dataset/ETHPy150Open adlnet/ADL_LRS/oauth_provider/store/__init__.py/get_store/original