code: def do_stacktrace(self) -> None:
          
          frame = sys._current_frames()[self._event_loop_thread_id]
          traceback.print_stack(frame, file=self._sout)
docs: Print a stack trace from the event loop thread