def prune(self, through_id):
        while len(self.queue) != 0 and self.queue[0]['id'] <= through_id:
            self.pop()
dataset/ETHPy150Open zulip/zulip/zerver/lib/event_queue.py/EventQueue.prune/original