human
I wrote the below code

    @functools.wraps(f)
    def wrapper(*args, **kwargs):
        wrapped_func = safe_utils.get_wrapped_function(f)
        keyed_args = inspect.getcallargs(wrapped_func, *args, **kwargs)
        context = keyed_args['context']
        use_slave = keyed_args.get('use_slave', False)
        if use_slave:
            reader_mode = get_context_manager(context).async
        else:
            reader_mode = get_context_manager(context).reader
        with reader_mode.using(context):
            return f(*args, **kwargs)
    return wrapper

What's a good function header?
assistant
#Here's a good function header.

def select_db_reader_mode(f):