code: def _build_argv(
      tool,
      filename,
      incldirs=None,
      includes=None,
      macros=None,
      preargs=None,
      postargs=None,
      executable=None,
      compiler=None,
  ):
      if includes:
          includes = tuple(f"-include{i}" for i in includes)
          postargs = (includes + postargs) if postargs else includes
  
      compiler = distutils.ccompiler.new_compiler(
          compiler=compiler or tool,
      )
      if executable:
          compiler.set_executable("preprocessor", executable)
  
      argv = None
  
      def _spawn(_argv):
          nonlocal argv
          argv = _argv
  
      compiler.spawn = _spawn
      compiler.preprocess(
          filename,
          macros=[tuple(v) for v in macros or ()],
          include_dirs=incldirs or (),
          extra_preargs=preargs or (),
          extra_postargs=postargs or (),
      )
      return argv
  
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 3 for calling a global function with example usage: _build_argv(tool, filename, incldirs, includes, macros, preargs, postargs, executable, compiler) and returns: argv