code: def event_loop(self):
          
          if hasattr(self.loop, '._run_once'):
              self.loop._thread_id = threading.get_ident()
              try:
                  self.loop._run_once()
              finally:
                  self.loop._thread_id = None
          else:
              self.loop.call_soon(self.loop.stop)
              self.loop.run_forever()
docs: Run the event loop once.