def __init__(self, collector, callback=None, *args, **kw):
        """
        Create a pager with a Reference to a remote collector and
        an optional callable to invoke upon completion.
        """
        if callable(callback):
            self.callback = callback
            self.callbackArgs = args
            self.callbackKeyword = kw
        else:
            self.callback = None
        self._stillPaging = 1
        self.collector = collector
        collector.broker.registerPageProducer(self)

        Create a pager with a Reference to a remote collector and
        an optional callable to invoke upon completion.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/spread/util.py