human
I wrote the below code

    def capture(function):
        @capture_exceptions(async_result)
        def captured_function(*args, **kwargs):
            value = function(*args, **kwargs)
            if (value is not None):
                async_result.set(value)
            return value
        return captured_function
    return capture

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

def wrap(async_result):