code: def get_tests(
      model_working_dir: Path,
      working_dir: Path,
      explicit_tests: Optional[List[int]] = None,
      color_enum: Type[Union[Color, NoColor]] = Color,
      skip_missing_args: bool = False,
      skip_network_tests: bool = False,
      skip_pr_tests: List[int] = [],
  ) -> List[TestData]:
      test_ref_dir: Path = Path(__file__).resolve().parent
  
      test_spec_file: Path = test_ref_dir / default_test_file
  
      test_spec_path = Path(test_spec_file)
      json_test_spec_content = open(test_spec_path).read()
      tests = json.loads(json_test_spec_content)
      print(f"Tests read from file: {test_spec_path.resolve()}")
  
      tests = convert_to_test_data(
          tests=tests,
          vw_bin="",
          spanning_tree_bin=None,
          skipped_ids=[],
          skip_network_tests=skip_network_tests,
          extra_vw_options="",
      )
      filtered_tests = []
      for test in tests:
          if (
              not test.depends_on
              and not test.is_shell
              and not test.skip
              and not "-i " in test.command_line
              and not "--no_stdin" in test.command_line
              and not "--help" in test.command_line
              and not "--flatbuffer" in test.command_line
              and not test.id in skip_pr_tests
          ):
              test.command_line = re.sub(
                  "-f [:a-zA-Z0-9_.\\-/]*", "", test.command_line
              )
              test.command_line = re.sub(
                  "-f=[:a-zA-Z0-9_.\\-/]*", "", test.command_line
              )
              test.command_line = re.sub(
                  "--final_regressor [:a-zA-Z0-9_.\\-/]*",
                  "",
                  test.command_line,
              )
              test.command_line = re.sub(
                  "--final_regressor=[:a-zA-Z0-9_.\\-/]*",
                  "",
                  test.command_line,
              )
              test.command_line = test.command_line.replace(
                  "--onethread", ""
              )
              create_test_dir(
                  test_id=test.id,
                  input_files=test.input_files,
                  test_base_dir=working_dir,
                  test_ref_dir=test_ref_dir,
              )
              # Check experimental and loadable reductions
              os.chdir(model_working_dir.parent)
              vw = try_get_workspace_or_none(
                  test.command_line,
                  quiet=True,
                  color_enum=color_enum,
                  skip_missing_args=skip_missing_args,
              )
              if vw is None:
                  continue
              skip_cmd = False
              for groups in vw.get_config().values():
                  for group in groups:
                      for opt in group[1]:
                          if opt.value_supplied and (
                              opt.experimental or opt.name == "bfgs"
                          ):
                              skip_cmd = True
                              break
                  if skip_cmd:
                      break
              vw.finish()
              if skip_cmd:
                  continue
  
              filtered_tests.append(test)
  
      if explicit_tests:
          filtered_tests = list(
              filter(lambda x: x.id in explicit_tests, filtered_tests)
          )
  
      return filtered_tests
  
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 5 for calling a global function with example usage: get_tests(model_working_dir, working_dir, explicit_tests, color_enum, skip_missing_args, skip_network_tests, skip_pr_tests) and returns: filtered_tests