code: def _uninstall(req, dont_prompt):
      args = [sys.executable, "-m", "pip", "uninstall"]
      if dont_prompt:
          args.append("--yes")
      args.append(req)
      try:
          subprocess.check_call(args)
      except subprocess.CalledProcessError as e:
          if "not installed" in str(e):
              log.warning("%s is not installed, skipping", req)
          else:
              raise
  
imports: import logging
  import os
  import re
  import subprocess
  import sys
  from guild import util
label_desc: Use image node_id 6 for calling a global function with example usage: _uninstall(req, dont_prompt) without return types