def get_context_manager(context):
 return (_context_manager_from_context(context) or main_context_manager)

def get_context_manager ( context ) : return ( _context_manager_from_context ( context ) or main_context_manager )
get a database context manager object .