code: def run_tidy_for_all_files(args, all_files):
      pool = None if args.j == 1 else mp.Pool(args.j)
      # actual tidy checker
      for cmd in all_files:
          # skip files that we don't want to look at
          if (
              args.ignore_compiled is not None
              and re.search(args.ignore_compiled, cmd["file"])
              is not None
          ):
              continue
          if (
              args.select_compiled is not None
              and re.search(args.select_compiled, cmd["file"]) is None
          ):
              continue
          if pool is not None:
              pool.apply_async(
                  run_clang_tidy,
                  args=(cmd, args),
                  callback=collect_result,
              )
          else:
              passed, stdout, file = run_clang_tidy(cmd, args)
              collect_result((passed, stdout, file))
      if pool is not None:
          pool.close()
          pool.join()
      return print_results()
  
imports: import argparse
  import json
  import multiprocessing
  import os
  import re
  import shutil
  import subprocess
  import sys
  from pathlib import Path
  import tomli
label_desc: Use image node_id 15 for calling a global function with example usage: run_tidy_for_all_files(args, all_files) and returns: print_results