code: def do_dirty_check(test_base_ref_dir: Path) -> None:
      result = subprocess.run(
          "git clean --dry-run -d -x -e __pycache__".split(),
          stdout=subprocess.PIPE,
          stderr=subprocess.PIPE,
          cwd=test_base_ref_dir,
          timeout=10,
      )
      return_code = result.returncode
      if return_code != 0:
          print(
              "Failed to run 'git clean --dry-run -d -x -e __pycache__'"
          )
      stdout = try_decode(result.stdout)
      if len(stdout) != 0:
          print(
              "Error: Test dir is not clean, this can result in false negatives. To ignore this and continue anyway pass --ignore_dirty or pass --clean_dirty to clean"
          )
          print(
              "'git clean --dry-run -d -x -e __pycache__' output:\n---"
          )
          print(stdout)
          sys.exit(1)
  
imports: import shutil
  import threading
  import argparse
  import difflib
  from pathlib import Path
  import re
  import os
  import subprocess
  import sys
  import traceback
  import shlex
  import math
  import json
  from concurrent.futures import ThreadPoolExecutor, Future
  from enum import Enum
  import socket
  from typing import Any, Callable, Dict, List, Mapping, Optional, Set, Tuple, Type, Union, cast
  from run_tests_common import TestData
  import runtests_flatbuffer_converter
label_desc: Use image node_id 18 for calling a global function with example usage: do_dirty_check(test_base_ref_dir) without return types