human
Complete this python program:
def configure_extensions(app):
assistant
#Here is the Python program you requested.

    """Configures the extensions.
    """
    csrf.init_app(app)
    plugin_manager.init_app(app)
    db.init_app(app)
    alembic.init_app(app, command_name='db')
    mail.init_app(app)
    cache.init_app(app)
    debugtoolbar.init_app(app)
    themes.init_themes(app, app_identifier='flaskbb')
    redis_store.init_app(app)
    limiter.init_app(app)
    whooshee.init_app(app)
    if (not app.testing):
        whooshee.register_whoosheer(PostWhoosheer)
        whooshee.register_whoosheer(TopicWhoosheer)
        whooshee.register_whoosheer(ForumWhoosheer)
        whooshee.register_whoosheer(UserWhoosheer)
    login_manager.login_view = app.config['LOGIN_VIEW']
    login_manager.refresh_view = app.config['REAUTH_VIEW']
    login_manager.login_message_category = app.config['LOGIN_MESSAGE_CATEGORY']
    login_manager.needs_refresh_message_category = app.config['REFRESH_MESSAGE_CATEGORY']
    login_manager.anonymous_user = Guest
    @login_manager.user_loader
    def load_user(user_id):
        'Loads    the    user.    Required    by    the    `login`    extension.'
        user_instance = User.query.filter_by(id=user_id).first()
        if user_instance:
            return user_instance
        else:
            return None
    login_manager.init_app(app)
    babel.init_app(app=app, default_domain=FlaskBBDomain(app))
    @babel.localeselector
    def get_locale():
        if (current_user and current_user.is_authenticated and current_user.language):
            return current_user.language
        return flaskbb_config['DEFAULT_LANGUAGE']
    allows.init_app(app)
    allows.identity_loader((lambda : current_user))