human
I wrote the below code

    @functools.wraps(function)
    def wrapper(*args, **kwargs):
        offset = 1
        if ('prefix' in kwargs):
            prefix = name_or_value(kwargs['prefix'])
        else:
            prefix = name_or_value(args[offset])
            offset += 1
        if ('key' in kwargs):
            key = name_or_value(kwargs['key'])
        else:
            key = name_or_value(args[offset])
        if ((prefix not in args[0]._stack) or (key not in args[0]._stack[prefix])):
            return False
        return function(*args, **kwargs)
    return wrapper

What's a good function header?
assistant
#Here is Python program to fix = name_or_value(kwargs['prefix'])
.

def check_for_prefix_and_key(function):