code: def add_common_cli(parser, *, get_preprocessor=_get_preprocessor):
      parser.add_argument("--macros", action="append")
      parser.add_argument("--incldirs", action="append")
      parser.add_argument("--same", action="append")
      process_fail_arg = add_failure_filtering_cli(parser, FAIL)
  
      def process_args(args, *, argv):
          ns = vars(args)
  
          process_fail_arg(args, argv=argv)
          ignore_exc = ns.pop("ignore_exc")
          # We later pass ignore_exc to _get_preprocessor().
  
          args.get_file_preprocessor = get_preprocessor(
              file_macros=ns.pop("macros"),
              file_incldirs=ns.pop("incldirs"),
              file_same=ns.pop("same"),
              ignore_exc=ignore_exc,
              log_err=print,
          )
  
      return process_args
  
file_path: cpython/Tools/c-analyzer/c_parser/preprocessor/__main__.py
imports: import logging
  import sys
  from c_common.scriptutil import add_verbosity_cli, add_traceback_cli, add_kind_filtering_cli, add_files_cli, add_failure_filtering_cli, add_commands_cli, process_args_by_key, configure_logger, get_prog, main_for_filenames
  from .None import errors, get_preprocessor
label_desc: Use image node_id 1 for calling a global function with example usage: add_common_cli(parser) and returns: process_args