def create_attempter(f):
    """
    Helper method for methods that call others and use ``Future`` directly.

    Returns a wrapper function that will set the given ``Future``'s exception
    state if the inner function call fails.
    """
    def attempt(fn, *args, **kwargs):
        if f.done():
            return

        try:
            fn(*args, **kwargs)
        except Exception as e:
            f.set_exception(e)

    return attempt