human
I wrote the below code

    queue = Queue.Queue()
    def _callFromThread():
        result = defer.maybeDeferred(f, *a, **kw)
        result.addBoth(queue.put)
    reactor.callFromThread(_callFromThread)
    result = queue.get()
    if isinstance(result, failure.Failure):
        result.raiseException()
    return result

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

def blockingCallFromThread(reactor, f, *a, **kw):