code: def test_subclass_callables(
      self, km_subclass: SyncKMSubclass
  ) -> None:
      km_subclass.reset_counts()
  
      km_subclass.start_kernel(stdout=PIPE, stderr=PIPE)
      assert km_subclass.call_count("start_kernel") == 1
      assert km_subclass.call_count("_async_launch_kernel") == 1
  
      is_alive = km_subclass.is_alive()
      assert is_alive
      km_subclass.reset_counts()
  
      km_subclass.restart_kernel(now=True)
      assert km_subclass.call_count("restart_kernel") == 1
      assert km_subclass.call_count("_async_shutdown_kernel") == 1
      assert km_subclass.call_count("_async_interrupt_kernel") == 1
      assert km_subclass.call_count("_async_kill_kernel") == 1
      assert km_subclass.call_count("_async_cleanup_resources") == 1
      assert km_subclass.call_count("_async_launch_kernel") == 1
      assert km_subclass.call_count("_async_signal_kernel") == 1
  
      is_alive = km_subclass.is_alive()
      assert is_alive
      assert km_subclass.call_count("is_alive") >= 1
      km_subclass.reset_counts()
  
      km_subclass.interrupt_kernel()
      assert km_subclass.call_count("_async_signal_kernel") == 1
  
      assert isinstance(km_subclass, KernelManager)
      km_subclass.reset_counts()
  
      km_subclass.shutdown_kernel(now=False)
      assert km_subclass.call_count("shutdown_kernel") == 1
      assert km_subclass.call_count("_async_interrupt_kernel") == 1
      assert km_subclass.call_count("_async_cleanup_resources") == 1
      assert km_subclass.call_count("_async_signal_kernel") == 1
      assert km_subclass.call_count("_async_is_alive") >= 1
  
      is_alive = km_subclass.is_alive()
      assert is_alive is False
      assert km_subclass.call_count("_async_is_alive") >= 1
      assert km_subclass.context.closed
  
imports: import asyncio
  import concurrent.futures
  import json
  import os
  import signal
  import sys
  import time
  from subprocess import PIPE
  import pytest
  from jupyter_core import paths
  from traitlets.config.loader import Config
  from jupyter_client import AsyncKernelManager, KernelManager
  from jupyter_client.manager import _ShutdownStatus, start_new_async_kernel, start_new_kernel
  from .utils import AsyncKMSubclass, SyncKMSubclass
label_desc: Use image node_id 5 for calling the TestKernelManager obj's underlying member method code with example usage: obj.test_subclass_callables(km_subclass) without return types