code: def core_test(files, grid, outputs, job_assert, job_assert_args):
      vw = Vw(CURR_DICT + "/.vw_cache", reset=True, handler=None)
      result = vw.train(files, grid, outputs)
      for j in result:
          test_name = (
              job_assert.__name__
              + "_"
              + "_".join(
                  "".join([i for i in str(j.opts) if i != "-"]).split(
                      " "
                  )
              )
          )
          GENERATED_TEST_CASES.append(
              [lambda: job_assert(j, **job_assert_args), test_name]
          )
          if STORE_OUTPUT:
              if not os.path.exists(CURR_DICT + "/output"):
                  os.mkdir(CURR_DICT + "/output")
              if not os.path.exists(CURR_DICT + "/output/" + test_name):
                  os.mkdir(CURR_DICT + "/output/" + test_name)
              fileName = str(list(j.outputs.values())[0][0]).split("/")[
                  -1
              ]
              for key, value in list(j.outputs.items()):
                  copy_file(
                      value[0],
                      CURR_DICT
                      + "/output/"
                      + test_name
                      + "/"
                      + f"{key}_"
                      + fileName,
                  )
              copy_file(
                  os.path.join(j.cache.path, "cacheNone/" + fileName),
                  CURR_DICT + "/output/" + test_name + "/" + fileName,
              )
  
file_path: vowpal_wabbit/python/tests/e2e_v2/test_core.py
imports: from vw_executor.vw import Vw
  from vw_executor.vw_opts import Grid
  import pytest
  import os
  import logging
  from test_helper import json_to_dict_list, evaluate_expression, copy_file, custom_sort, get_function_obj_with_dirs, datagen_driver
  from conftest import STORE_OUTPUT
label_desc: Use image node_id 3 for calling a global function with example usage: core_test(files, grid, outputs, job_assert, job_assert_args) without return types