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","."]
docstr: Remove any keyword arguments that Popen does not tolerate.
docstr_tok: ["Remove","any","keyword","arguments","that","Popen","does","not","tolerate","."]
code: def _scrub_kwargs(kwargs: Dict[str, Any]) -> Dict[str, Any]:
      """Remove any keyword arguments that Popen does not tolerate."""
      keywords_to_scrub: List[str] = ["extra_arguments", "kernel_id"]
      scrubbed_kwargs = kwargs.copy()
      for kw in keywords_to_scrub:
          scrubbed_kwargs.pop(kw, None)
      return scrubbed_kwargs
  
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 3 for calling the LocalProvisioner obj's underlying member method code with example usage: obj._scrub_kwargs(kwargs) and returns: scrubbed_kwargs