code: def viz_test(
      img,
      pre_output,
      pre_box,
      gt_box,
      img_name,
      result_dir,
      test_folder_name,
  ):
      if test_folder_name == "synthtext":
          save_result_synth(
              img_name,
              img[:, :, ::-1].copy(),
              pre_output,
              pre_box,
              gt_box,
              result_dir,
          )
      elif test_folder_name == "icdar2013":
          save_result_2013(
              img_name,
              img[:, :, ::-1].copy(),
              pre_output,
              pre_box,
              gt_box,
              result_dir,
          )
      elif test_folder_name == "icdar2015":
          save_result_2015(
              img_name,
              img[:, :, ::-1].copy(),
              pre_output,
              pre_box,
              gt_box,
              result_dir,
          )
      elif test_folder_name == "custom_data":
          save_result_2015(
              img_name,
              img[:, :, ::-1].copy(),
              pre_output,
              pre_box,
              gt_box,
              result_dir,
          )
      else:
          print("not found test dataset")
  
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 6 for calling a global function with example usage: viz_test(img, pre_output, pre_box, gt_box, img_name, result_dir, test_folder_name) without return types