human
I wrote the below code

    d = Deferred()
    def callback(future):
        e = future.exception()
        if e:
            d.errback(e)
            return
        d.callback(future.result())
    future.add_done_callback(callback)
    return d

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

def deferred_from_future(future):