def registerProducer(self, prod, s):
        """
        Call an L{IPullProducer}'s C{resumeProducing} method in a
        loop until it unregisters itself.

        @param prod: The producer.
        @type prod: L{IPullProducer}

        @param s: Whether or not the producer is streaming.
        """
        # XXX: Handle IPushProducers
        self.go = 1
        while self.go:
            prod.resumeProducing()

        Call an L{IPullProducer}'s C{resumeProducing} method in a
        loop until it unregisters itself.

        @param prod: The producer.
        @type prod: L{IPullProducer}

        @param s: Whether or not the producer is streaming.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/requesthelper.py