human
I wrote the below code

    if ('resource' in get_argnames(action)):
        shim = action
    else:
        def shim(req, resp, resource):
            action(req, resp)
    @wraps(responder)
    def do_after(self, req, resp, **kwargs):
        responder(self, req, resp, **kwargs)
        shim(req, resp, self)
    return do_after

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

def _wrap_with_after(action, responder):