code: def check_no_unexpected_results(mypy_lines: Iterator[str]):
      """Compares mypy results with list of known FAILING files.
  
      Exits the process with non-zero exit code upon unexpected results.
      """
      df = mypy_to_pandas(mypy_lines)
      all_files = {
          str(fp)
          .replace(str(DP_ROOT), "")
          .strip(os.sep)
          .replace(os.sep, "/")
          for fp in DP_ROOT.glob("pymc/**/*.py")
          if "tests" not in str(fp)
      }
      failing = set(
          df.reset_index().file.str.replace(os.sep, "/", regex=False)
      )
      if not failing.issubset(all_files):
          raise Exception(
              "Mypy should have ignored these files:\n"
              + "\n".join(sorted(map(str, failing - all_files)))
          )
      passing = all_files - failing
      expected_failing = set(FAILING.strip().split("\n")) - {""}
      unexpected_failing = failing - expected_failing
      unexpected_passing = passing.intersection(expected_failing)
  
      if not unexpected_failing:
          print(
              f"{len(passing)}/{len(all_files)} files pass as expected."
          )
      else:
          print("!!!!!!!!!")
          print(f"{len(unexpected_failing)} files unexpectedly failed.")
          print("\n".join(sorted(map(str, unexpected_failing))))
          print(
              "These files did not fail before, so please check the above output"
              f" for errors in {unexpected_failing} and fix them."
          )
          print(
              "You can run `python scripts/run_mypy.py --verbose` to reproduce this test locally."
          )
          sys.exit(1)
  
      if unexpected_passing:
          print("!!!!!!!!!")
          print(
              f"{len(unexpected_passing)} files unexpectedly passed the type checks:"
          )
          print("\n".join(sorted(map(str, unexpected_passing))))
          print(
              "This is good news! Go to scripts/run_mypy.py and remove them from the `FAILING` list."
          )
          if all_files.issubset(passing):
              print("WOW! All files are passing the mypy type checks!")
              print("scripts\\run_mypy.py may no longer be needed.")
          print("!!!!!!!!!")
          sys.exit(1)
      return
  
file_path: pymc/scripts/run_mypy.py
imports: import argparse
  import importlib
  import os
  import pathlib
  import subprocess
  import sys
  from typing import Iterator
  import pandas
label_desc: Use image node_id 3 for calling a global function with example usage: check_no_unexpected_results(mypy_lines) without return types