code: def process(self):
          
          assert self.queue is not None
          while True:
              event = self.queue.get()
              if self.pre_process_event(event):
                  self.invoke_handlers(event)
              self.queue.task_done()
docs: Loops over the underlying queue of events and processes them in order.