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 os
  import time
  import yaml
  import glob
  from functools import reduce
  from PIL import Image
  import cv2
  import math
  import numpy
  import paddle
  import sys
  from preprocess import preprocess, NormalizeImage, Permute
  from keypoint_preprocess import EvalAffine, TopDownEvalAffine, expand_crop
  from keypoint_postprocess import HrHRNetPostProcess, HRNetPostProcess
  from visualize import visualize_pose
  from paddle.inference import Config
  from paddle.inference import create_predictor
  from utils import argsparser, Timer, get_current_memory_mb
  from benchmark_utils import PaddleInferBenchmark
  from infer import Detector, get_test_images, print_arguments
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