code: def test(logger):
      """
      perform testing for a given fold (or hold out set). save stats in evaluator.
      """
      logger.info(
          "starting testing model of fold {} in exp {}".format(
              cf.fold, cf.exp_dir
          )
      )
      net = model.net(cf, logger).cuda()
      test_predictor = Predictor(cf, net, logger, mode="test")
      test_evaluator = Evaluator(cf, logger, mode="test")
      batch_gen = data_loader.get_test_generator(cf, logger)
      test_results_list = test_predictor.predict_test_set(
          batch_gen, return_results=True
      )
      test_evaluator.evaluate_predictions(test_results_list)
      test_evaluator.score_test_df()
  
file_path: medicaldetectiontoolkit/exec.py
imports: import argparse
  import os
  import time
  import torch
  import utils.exp_utils
  from evaluator import Evaluator
  from predictor import Predictor
  from plotting import plot_batch_prediction
label_desc: Use image node_id 2 for calling a global function with example usage: test(logger) without return types