def getAllPages(referenceable, methodName, *args, **kw):
    """
    A utility method that will call a remote method which expects a
    PageCollector as the first argument.
    """
    d = defer.Deferred()
    referenceable.callRemote(methodName, CallbackPageCollector(d.callback), *args, **kw)
    return d

    A utility method that will call a remote method which expects a
    PageCollector as the first argument.
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/spread/util.py