class_docstr: Dummy app wrapping argparse
class_docstr_tok: ["Dummy","app","wrapping","argparse"]
code: def start(self):
      import argparse
  
      parser = argparse.ArgumentParser(
          prog=self.name, description="Install the IPython kernel spec."
      )
      parser.add_argument(
          "--user",
          action="store_true",
          help="Install for the current user instead of system-wide",
      )
      parser.add_argument(
          "--name",
          type=str,
          default=KERNEL_NAME,
          help="Specify a name for the kernelspec."
          " This is needed to have multiple IPython kernels at the same time.",
      )
      parser.add_argument(
          "--display-name",
          type=str,
          help="Specify the display name for the kernelspec."
          " This is helpful when you have multiple IPython kernels.",
      )
      parser.add_argument(
          "--profile",
          type=str,
          help="Specify an IPython profile to load. "
          "This can be used to create custom versions of the kernel.",
      )
      parser.add_argument(
          "--prefix",
          type=str,
          help="Specify an install prefix for the kernelspec."
          " This is needed to install into a non-default location, such as a conda/virtual-env.",
      )
      parser.add_argument(
          "--sys-prefix",
          action="store_const",
          const=sys.prefix,
          dest="prefix",
          help="Install to Python's sys.prefix."
          " Shorthand for --prefix='%s'. For use in conda/virtual-envs."
          % sys.prefix,
      )
      opts = parser.parse_args(self.argv)
      try:
          dest = install(
              user=opts.user,
              kernel_name=opts.name,
              profile=opts.profile,
              prefix=opts.prefix,
              display_name=opts.display_name,
          )
      except OSError as e:
          if e.errno == errno.EACCES:
              print(e, file=sys.stderr)
              if opts.user:
                  print(
                      "Perhaps you want `sudo` or `--user`?",
                      file=sys.stderr,
                  )
              self.exit(1)
          raise
      print("Installed kernelspec %s in %s" % (opts.name, dest))
  
file_path: catboost/contrib/python/ipykernel/py2/ipykernel/kernelspec.py
imports: from __future__ import print_function
  import errno
  import json
  import os
  import shutil
  import sys
  import tempfile
  from jupyter_client.kernelspec import KernelSpecManager
  from traitlets.config import Application
label_desc: Use image node_id 2 for calling the InstallIPythonKernelSpecApp obj's underlying member method code with example usage: obj.start() without return types