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