human
Complete this python program:
def deferred_from_future(future):
assistant
#Here is the Python program you requested.

    """Converts a concurrent.futures.Future object to a twisted.internet.defer.Deferred obejct.
    See: https://twistedmatrix.com/pipermail/twisted-python/2011-January/023296.html
    """
    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