class_docstr: An in-process kernel.
docstr: Initialize the kernel.
docstr_tok: ["Initialize","the","kernel","."]
code: def __init__(self, **traits):
      """Initialize the kernel."""
      super().__init__(**traits)
  
      self._underlying_iopub_socket.observe(
          self._io_dispatch, names=["message_sent"]
      )
      if self.shell:
          self.shell.kernel = self
  
imports: import logging
  import sys
  from contextlib import contextmanager
  from IPython.core.interactiveshell import InteractiveShellABC
  from traitlets import Any, Enum, Instance, List, Type, default
  from ipykernel.ipkernel import IPythonKernel
  from ipykernel.jsonutil import json_clean
  from ipykernel.zmqshell import ZMQInteractiveShell
  from ..iostream import BackgroundSocket, IOPubThread, OutStream
  from .constants import INPROCESS_KEY
  from .socket import DummySocket
label_desc: Use image node_id 3 to create a new InProcessKernel object from inherited base classes: IPythonKernel with example: obj = InProcessKernel()