code: def _is_valid_kernel_name(name):
      """Check that a kernel name is valid."""
      # quote is not unicode-safe on Python 2
      return _kernel_name_pat.match(name)
  
imports: import errno
  import io
  import json
  import os
  import re
  import shutil
  import warnings
  from ipython_genutils.py3compat import PY3
  from traitlets import HasTraits, List, Unicode, Dict, Set, Bool, Type, CaselessStrEnum
  from traitlets.config import LoggingConfigurable
  from jupyter_core.paths import jupyter_data_dir, jupyter_path, SYSTEM_JUPYTER_PATH
label_desc: Use image node_id 1 for calling a global function with example usage: _is_valid_kernel_name(name) and returns: _kernel_name_pat