code: def next_message(self):
          
          if self._is_running:
              raise Exception('Event loop already running')
          if self._pending_messages:
              return self._pending_messages.popleft()
          self._async_session.run(self._enqueue_request_and_stop,
                                  self._enqueue_notification_and_stop)
          if self._pending_messages:
              return self._pending_messages.popleft()
docs: Block until a message(request or notification) is available.
  
          If any messages were previously enqueued, return the first in queue.
          If not, run the event loop until one is received.