code: def run_cmd(
      argv,
      *,
      # capture_output=True,
      stdout=subprocess.PIPE,
      # stderr=subprocess.STDOUT,
      stderr=subprocess.PIPE,
      text=True,
      check=True,
      **kwargs,
  ):
      if isinstance(stderr, str) and stderr.lower() == "stdout":
          stderr = subprocess.STDOUT
  
      kw = dict(locals())
      kw.pop("argv")
      kw.pop("kwargs")
      kwargs.update(kw)
  
      # Remove LANG environment variable: the C parser doesn't support GCC
      # localized messages
      env = dict(os.environ)
      env.pop("LANG", None)
  
      proc = subprocess.run(argv, env=env, **kwargs)
      return proc.stdout
  
file_path: cpython/Tools/c-analyzer/c_parser/preprocessor/common.py
imports: import contextlib
  import distutils.ccompiler
  import logging
  import os
  import shlex
  import subprocess
  import sys
  from ..info import FileInfo, SourceLine
  from .errors import PreprocessorFailure, ErrorDirectiveError, MissingDependenciesError, OSMismatchError
label_desc: Use image node_id 1 for calling a global function with example usage: run_cmd(argv) and returns: proc