human
I wrote the below code

    if (decorator is None):
        decorator = _decorator_noop
    @functools.wraps(fn)
    def wrapped(*args, **kwargs):
        return decorator(fn(action(*args, **kwargs)))
    return wrapped

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

def wrap(action, fn, decorator=None):