class_docstr: A trio loop runner.
class_docstr_tok: ["A","trio","loop","runner","."]
docstr: Initialize the runner.
docstr_tok: ["Initialize","the","runner","."]
code: def initialize(self, kernel, io_loop):
      """Initialize the runner."""
      kernel.shell.set_trio_runner(self)
      kernel.shell.run_line_magic("autoawait", "trio")
      kernel.shell.magics_manager.magics["line"][
          "autoawait"
      ] = lambda _: warnings.warn(
          "Autoawait isn't allowed in Trio background loop mode.",
          stacklevel=2,
      )
      self._interrupted = False
      bg_thread = threading.Thread(
          target=io_loop.start, daemon=True, name="TornadoBackground"
      )
      bg_thread.start()
  
file_path: catboost/contrib/python/ipykernel/py3/ipykernel/trio_runner.py
imports: import builtins
  import logging
  import signal
  import threading
  import traceback
  import warnings
  import trio
label_desc: Use image node_id 2 for calling the TrioRunner obj's underlying member method code with example usage: obj.initialize(kernel, io_loop) without return types