def consume(self, limit=None):
        """Returns an iterator that waits for one message at a time."""
        for total_message_count in count():
            if limit and total_message_count >= limit:
                raise StopIteration
            self.drain_events()
            yield True
dataset/ETHPy150Open ask/carrot/carrot/backends/pystomp.py/Backend.consume/original