code: def cal_eval(config, data, res_dir_name, opt, mode):
      evaluator = DetectionIoUEvaluator()
      test_config = DotDict(config.test[data])
      res_dir = os.path.join(
          os.path.join("exp", args.yaml), "{}".format(res_dir_name)
      )
  
      if opt == "iou_eval":
          main_eval(
              config.test.trained_model,
              config.train.backbone,
              test_config,
              evaluator,
              res_dir,
              buffer=None,
              model=None,
              mode=mode,
          )
      else:
          print("Undefined evaluation")
  
imports: import argparse
  import os
  import cv2
  import numpy
  import torch
  import torch.backends.cudnn
  from tqdm import tqdm
  import wandb
  from config.load_config import load_yaml, DotDict
  from model.craft import CRAFT
  from metrics.eval_det_iou import DetectionIoUEvaluator
  from utils.inference_boxes import test_net, load_icdar2015_gt, load_icdar2013_gt, load_synthtext_gt
  from utils.util import copyStateDict
label_desc: Use image node_id 8 for calling a global function with example usage: cal_eval(config, data, res_dir_name, opt, mode) without return types