code: def draw_skeleton(img, kp, thresh=0.2, color=None):
      """Draws a COCO-style skeleton defined by keypoints `kp` on the current axes."""
      SKELETON = [
          (15, 13),
          (13, 11),
          (16, 14),
          (14, 12),
          (11, 12),
          (5, 11),
          (6, 12),
          (5, 6),
          (5, 7),
          (6, 8),
          (7, 9),
          (8, 10),
          (1, 2),
          (0, 1),
          (0, 2),
          (1, 3),
          (2, 4),
          (3, 5),
          (4, 6),
      ]
      MARGIN = 2
      num_joints = 17
  
      if color is None:
          color = np.random.randint(
              0, 256, (1, 3), dtype=np.uint8
          ).tolist()[0]
  
      x = kp[:, 0]
      y = kp[:, 1]
      scores = kp[:, 2]
  
      # Remove predictions outside the image
      for i in range(len(scores)):
          if (
              (x[i] <= MARGIN)
              or (x[i] >= img.shape[1] - MARGIN)
              or (y[i] <= MARGIN)
              or (y[i] >= img.shape[0] - MARGIN)
          ):
              scores[i] = 0
  
      # Only display predictions with score greater than a threshold
      indxs = scores > thresh
  
      im_scale = min(img.shape[:2])
      for p in SKELETON:
          if (indxs[p[0]]) and (indxs[p[1]]):
              cv2.line(
                  img,
                  (int(x[p[0]]), int(y[p[0]])),
                  (int(x[p[1]]), int(y[p[1]])),
                  color,
                  int(im_scale / 300) + 1,
              )
  
      for i in range(num_joints):
          if indxs[i]:
              cv2.circle(img, (int(x[i]), int(y[i])), 2, color, 2)
      return img
  
file_path: gluon-cv/scripts/pose/directpose/tvm_evaluation/evaluate_pose.py
imports: import json
  import numpy
  import os
  from pose_model import PoseEstimationInferenceModel
  import cv2
  from PIL import Image
  from tqdm import tqdm
  import matplotlib
  import matplotlib.pyplot
label_desc: Use image node_id 3 for calling a global function with example usage: draw_skeleton(img, kp, thresh, color) and returns: img