class_docstr: :class:`LocalProvisioner` is a concrete class of ABC :py:class:`KernelProvisionerBase`
  and is the out-of-box default implementation used when no kernel provisioner is
  specified in the kernel specification (``kernel.json``).  It provides functional
  parity to existing applications by launching the kernel locally and using
  :class:`subprocess.Popen` to manage its lifecycle.
  
  This class is intended to be subclassed for customizing local kernel environments
  and serve as a reference implementation for other custom provisioners.
class_docstr_tok: [":","class",":","`","LocalProvisioner","`","is","a","concrete","class","of","ABC",":","py",":","class",":","`","KernelProvisionerBase","`","and","is","the","out-of-box","default","implementation","used","when","no","kernel","provisioner","is","specified","in","the","kernel","specification","(","``","kernel.json","``",")",".","It","provides","functional","parity","to","existing","applications","by","launching","the","kernel","locally","and","using",":","class",":","`","subprocess.Popen","`","to","manage","its","lifecycle",".","This","class","is","intended","to","be","subclassed","for","customizing","local","kernel","environments","and","serve","as","a","reference","implementation","for","other","custom","provisioners","."]
code: def _tolerate_no_process(os_error: OSError) -> None:
      # In Windows, we will get an Access Denied error if the process
      # has already terminated. Ignore it.
      if sys.platform == "win32":
          if os_error.winerror != 5:
              raise
      # On Unix, we may get an ESRCH error (or ProcessLookupError instance) if
      # the process has already terminated. Ignore it.
      else:
          from errno import ESRCH
  
          if (
              not isinstance(os_error, ProcessLookupError)
              or os_error.errno != ESRCH
          ):
              raise
  
file_path: catboost/contrib/python/jupyter-client/py3/jupyter_client/provisioning/local_provisioner.py
imports: import asyncio
  import os
  import signal
  import sys
  from typing import TYPE_CHECKING, Any, Dict, List, Optional
  from ..connect import KernelConnectionInfo, LocalPortCache
  from ..launcher import launch_kernel
  from ..localinterfaces import is_local_ip, local_ips
  from .provisioner_base import KernelProvisionerBase
label_desc: Use image node_id 2 for calling the LocalProvisioner obj's underlying member method code with example usage: obj._tolerate_no_process(os_error) without return types