code: def draw_handpose(canvas, all_hand_peaks, show_number=False):
      edges = [
          [0, 1],
          [1, 2],
          [2, 3],
          [3, 4],
          [0, 5],
          [5, 6],
          [6, 7],
          [7, 8],
          [0, 9],
          [9, 10],
          [10, 11],
          [11, 12],
          [0, 13],
          [13, 14],
          [14, 15],
          [15, 16],
          [0, 17],
          [17, 18],
          [18, 19],
          [19, 20],
      ]
  
      for peaks in all_hand_peaks:
          for ie, e in enumerate(edges):
              if np.sum(np.all(peaks[e], axis=1) == 0) == 0:
                  x1, y1 = peaks[e[0]]
                  x2, y2 = peaks[e[1]]
                  cv2.line(
                      canvas,
                      (x1, y1),
                      (x2, y2),
                      matplotlib.colors.hsv_to_rgb(
                          [ie / float(len(edges)), 1.0, 1.0]
                      )
                      * 255,
                      thickness=2,
                  )
  
          for i, keyponit in enumerate(peaks):
              x, y = keyponit
              cv2.circle(canvas, (x, y), 4, (0, 0, 255), thickness=-1)
              if show_number:
                  cv2.putText(
                      canvas,
                      str(i),
                      (x, y),
                      cv2.FONT_HERSHEY_SIMPLEX,
                      0.3,
                      (0, 0, 0),
                      lineType=cv2.LINE_AA,
                  )
      return canvas
  
file_path: carefree-learn/cflearn/api/cv/third_party/openpose/util.py
imports: import math
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: draw_handpose(canvas, all_hand_peaks, show_number) and returns: canvas