human
I wrote the below code

    def repl(*args, **kwargs):
        if (pos == 'after'):
            old(*args, **kwargs)
            return new(*args, **kwargs)
        elif (pos == 'before'):
            new(*args, **kwargs)
            return old(*args, **kwargs)
        else:
            return new(_old=old, *args, **kwargs)
    def decorator_wrapper(f, *args, **kwargs):
        return repl(*args, **kwargs)
    return decorator.decorator(decorator_wrapper)(old)

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

def wrap(old, new, pos='after'):