def DeferredSerializer(original, context):
    d = defer.Deferred()
    def cb(result):
        d2 = defer.maybeDeferred(flat.serialize, result, context)
        d2.chainDeferred(d)
        return result
    def eb(error):
        d.errback(error)
        return error
    original.addCallbacks(cb, eb)
    return d
Should group all guests by hosts when called without arguments
dataset/ETHPy150Open twisted/nevow/nevow/flat/twist.py/DeferredSerializer--crossover with--dataset/ETHPy150Open edelight/kitchen/kitchen/backends/tests.py/TestData.test_group_by_hosts