async function collect_tests(filename) {
  const model_types = fs.readdirSync(models_dir);
  const all_tests = [];
  for (const model_type of model_types) {
    const dir = path.join(models_dir, model_type);

    if (!fs.existsSync(dir) || !fs.statSync(dir).isDirectory()) {
      continue;
    }

    const file = path.join(dir, `test_${filename}_${model_type}.js`);
    if (!fs.existsSync(file)) {
      continue;
    }

    const items = await import(file);
    all_tests.push([model_type, items]);
  }
  return all_tests;
}
Helper function to collect all unit tests, which can be found in files
of the form: `tests/models/<model_type>/test_<filename>_<model_type>.js`.
@param {string} filename
@returns {Promise<[string, Function][]>}