def scoped_session_decorator(func):
@wraps(func)<EOL>def wrapper(*args, **kwargs):<EOL><INDENT>with sessions_scope(session):<EOL><INDENT>logger.debug("<STR_LIT>", func.__name__)<EOL>return func(*args, **kwargs)<EOL><DEDENT><DEDENT>return wrapper<EOL>
Manage contexts and add debugging to db sessions.