class_docstr: A manager for kernel specs.
code: def _kernel_dirs_default(self) -> list[str]:
      dirs = jupyter_path("kernels")
      # At some point, we should stop adding .ipython/kernels to the path,
      # but the cost to keeping it is very small.
      try:
          # this should always be valid on IPython 3+
          from IPython.paths import get_ipython_dir
  
          dirs.append(os.path.join(get_ipython_dir(), "kernels"))
      except ModuleNotFoundError:
          pass
      return dirs
  
imports: from __future__ import annotations
  import json
  import os
  import re
  import shutil
  import typing
  import warnings
  from jupyter_core.paths import SYSTEM_JUPYTER_PATH, jupyter_data_dir, jupyter_path
  from traitlets import Bool, CaselessStrEnum, Dict, HasTraits, List, Set, Type, Unicode, observe
  from traitlets.config import LoggingConfigurable
  from .provisioning import KernelProvisionerFactory
label_desc: Use image node_id 4 for calling the KernelSpecManager obj's underlying member method code with example usage: obj._kernel_dirs_default() and returns: dirs