code: def visualize(
      image_list, results, visual_thresh=0.6, save_dir="output"
  ):
      im_results = {}
      for i, image_file in enumerate(image_list):
          skeletons = results["keypoint"]
          scores = results["score"]
          skeleton = skeletons[i : i + 1]
          score = scores[i : i + 1]
          im_results["keypoint"] = [skeleton, score]
          visualize_pose(
              image_file,
              im_results,
              visual_thresh=visual_thresh,
              save_dir=save_dir,
          )
  
imports: import math
  import os
  import cv2
  import numpy
  import yaml
  from .infer import Detector
  from .keypoint_postprocess import HRNetPostProcess
  from .keypoint_preprocess import expand_crop
  from .visualize import visualize_pose
label_desc: Use image node_id 2 for calling a global function with example usage: visualize(image_list, results, visual_thresh, save_dir) without return types