code: def _run_pip(args, additional_paths=None):
      # Run the bootstrapping in a subprocess to avoid leaking any state that happens
      # after pip has executed. Particularly, this avoids the case when pip holds onto
      # the files in *additional_paths*, preventing us to remove them at the end of the
      # invocation.
      code = f"""
  import runpy
  import sys
  sys.path = {additional_paths or []} + sys.path
  sys.argv[1:] = {args}
  runpy.run_module("pip", run_name="__main__", alter_sys=True)
  """
  
      cmd = [
          sys.executable,
          "-W",
          "ignore::DeprecationWarning",
          "-c",
          code,
      ]
      if sys.flags.isolated:
          # run code in isolated mode if currently running isolated
          cmd.insert(1, "-I")
      return subprocess.run(cmd, check=True).returncode
  
file_path: cpython/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 3 for calling a global function with example usage: _run_pip(args, additional_paths) and returns: subprocess