code: def _bootstrap(
      *,
      root=None,
      upgrade=False,
      user=False,
      altinstall=False,
      default_pip=False,
      verbosity=0,
  ):
      """
      Bootstrap pip into the current Python installation (or the given root
      directory). Returns pip command status code.
  
      Note that calling this function will alter both sys.path and os.environ.
      """
      if altinstall and default_pip:
          raise ValueError(
              "Cannot use altinstall and default_pip together"
          )
  
      sys.audit("ensurepip.bootstrap", root)
  
      _disable_pip_configuration_settings()
  
      # By default, installing pip and setuptools installs all of the
      # following scripts (X.Y == running Python version):
      #
      #   pip, pipX, pipX.Y, easy_install, easy_install-X.Y
      #
      # pip 1.5+ allows ensurepip to request that some of those be left out
      if altinstall:
          # omit pip, pipX and easy_install
          os.environ["ENSUREPIP_OPTIONS"] = "altinstall"
      elif not default_pip:
          # omit pip and easy_install
          os.environ["ENSUREPIP_OPTIONS"] = "install"
  
      with tempfile.TemporaryDirectory() as tmpdir:
          # Put our bundled wheels into a temporary directory and construct the
          # additional paths that need added to sys.path
          additional_paths = []
          for name, package in _get_packages().items():
              if package.wheel_name:
                  # Use bundled wheel package
                  wheel_name = package.wheel_name
                  wheel_path = (
                      resources.files("ensurepip")
                      / "_bundled"
                      / wheel_name
                  )
                  whl = wheel_path.read_bytes()
              else:
                  # Use the wheel package directory
                  with open(package.wheel_path, "rb") as fp:
                      whl = fp.read()
                  wheel_name = os.path.basename(package.wheel_path)
  
              filename = os.path.join(tmpdir, wheel_name)
              with open(filename, "wb") as fp:
                  fp.write(whl)
  
              additional_paths.append(filename)
  
          # Construct the arguments to be passed to the pip command
          args = [
              "install",
              "--no-cache-dir",
              "--no-index",
              "--find-links",
              tmpdir,
          ]
          if root:
              args += ["--root", root]
          if upgrade:
              args += ["--upgrade"]
          if user:
              args += ["--user"]
          if verbosity:
              args += ["-" + "v" * verbosity]
  
          return _run_pip([*args, *_PACKAGE_NAMES], additional_paths)
  
file_path: catboost/contrib/tools/python3/src/Lib/ensurepip/__init__.py
imports: import collections
  import os
  import os.path
  import subprocess
  import sys
  import sysconfig
  import tempfile
  from importlib import resources
label_desc: Use image node_id 7 for calling a global function with example usage: _bootstrap() and returns: _run_pip