code: def main():
      parser = argparse.ArgumentParser(
          formatter_class=argparse.ArgumentDefaultsHelpFormatter
      )
      parser.add_argument(
          "-t",
          "--test",
          type=int,
          action="append",
          help="Run specific tests and ignore all others. Can specific as a single integer 'id'",
      )
  
      parser.add_argument(
          "--generate_models",
          action="store_true",
          help=f"Generate models using all eligible cli's from {default_test_file}",
      )
  
      parser.add_argument(
          "--load_models",
          action="store_true",
          help=f"Load all models using all eligible cli's from {default_test_file}. Assumes that --generate_models has been run beforehand",
      )
  
      parser.add_argument(
          "--clear_working_dir",
          action="store_true",
          help=f"Clear all models in {default_working_dir_name}",
      )
  
      parser.add_argument(
          "--generate_and_load",
          action="store_true",
          help=f"Generate models using all eligible cli's from {default_test_file} and then load them",
      )
  
      parser.add_argument(
          "--no_color",
          action="store_true",
          help="Don't print color ANSI escape codes",
      )
  
      parser.add_argument(
          "--skip_missing_args",
          action="store_true",
          help=f"This should be set when running on a previous version of VW. If new arguments then initializing VW with them is expected to fail.",
      )
  
      parser.add_argument(
          "--skip_pr_tests",
          type=str,
          action="append",
          help="Skip specific tests based on Pull Request description",
      )
  
      parser.add_argument(
          "--skip_network_tests",
          help="Skip all tests that require daemon or network connection",
          action="store_true",
      )
  
      args = parser.parse_args()
      if args.skip_pr_tests and "skip:" in args.skip_pr_tests[0]:
          skip_pr_tests = [
              int(x)
              for x in args.skip_pr_tests[0]
              .split("skip:")[-1]
              .strip()
              .split(" ")
          ]
      else:
          skip_pr_tests = []
      color_enum = NoColor if args.no_color else Color
  
      temp_working_dir = Path.home() / default_working_dir_name
      test_output_dir = (
          Path.home() / default_working_dir_name / "outputs"
      )
  
      if args.clear_working_dir:
          if args.load_models:
              print(
                  f"{color_enum.LIGHT_RED} --load_models specified along with --clear_working_dir. Loading models will not work without a directory of stored models. Exiting... {color_enum.ENDC}"
              )
              print(
                  f"{color_enum.LIGHT_RED} Exiting... {color_enum.ENDC}"
              )
          if os.path.isdir(temp_working_dir):
              shutil.rmtree(temp_working_dir)
  
      else:
          temp_working_dir.mkdir(parents=True, exist_ok=True)
          test_output_dir.mkdir(parents=True, exist_ok=True)
          tests = get_tests(
              test_output_dir,
              temp_working_dir,
              args.test,
              color_enum,
              args.skip_missing_args,
              args.skip_network_tests,
              skip_pr_tests,
          )
  
          if args.generate_models:
              generate_all(
                  tests,
                  test_output_dir,
                  color_enum,
                  args.skip_missing_args,
              )
          elif args.load_models:
              load_all(
                  tests,
                  test_output_dir,
                  color_enum,
                  args.skip_missing_args,
              )
          elif args.generate_and_load:
              generate_all(
                  tests,
                  test_output_dir,
                  color_enum,
                  args.skip_missing_args,
              )
              load_all(
                  tests,
                  test_output_dir,
                  color_enum,
                  args.skip_missing_args,
              )
          else:
              print(
                  f"{color_enum.LIGHT_GREEN}Specify a run option, use --help for more info {color_enum.ENDC}"
              )
  
file_path: vowpal_wabbit/test/run_tests_model_gen_and_load.py
imports: import argparse
  from genericpath import isdir, isfile
  from pathlib import Path
  import re
  import os
  import shutil
  import json
  from run_tests import convert_to_test_data, Color, NoColor, TestData
  import vowpalwabbit
  from typing import Any, Callable, Dict, List, Mapping, Optional, Set, Tuple, Type, Union, cast
label_desc: Use image node_id 8 for calling a global function with example usage: main() without return types