class_docstr: Detect hand pose information from body pose estimation result.
  
  Args:
      ratioWristElbow(float): Ratio to adjust the wrist center, ,default is 0.33.
code: def __call__(
      self,
      candidate: np.ndarray,
      subset: np.ndarray,
      oriImg: np.ndarray,
  ):
      detect_result = []
      image_height, image_width = oriImg.shape[0:2]
      for person in subset.astype(int):
          has_left = np.sum(person[[5, 6, 7]] == -1) == 0
          has_right = np.sum(person[[2, 3, 4]] == -1) == 0
          if not (has_left or has_right):
              continue
          hands = []
          # left hand
          if has_left:
              (
                  left_shoulder_index,
                  left_elbow_index,
                  left_wrist_index,
              ) = person[[5, 6, 7]]
              x1, y1 = candidate[left_shoulder_index][:2]
              x2, y2 = candidate[left_elbow_index][:2]
              x3, y3 = candidate[left_wrist_index][:2]
              hands.append([x1, y1, x2, y2, x3, y3, True])
          # right hand
          if has_right:
              (
                  right_shoulder_index,
                  right_elbow_index,
                  right_wrist_index,
              ) = person[[2, 3, 4]]
              x1, y1 = candidate[right_shoulder_index][:2]
              x2, y2 = candidate[right_elbow_index][:2]
              x3, y3 = candidate[right_wrist_index][:2]
              hands.append([x1, y1, x2, y2, x3, y3, False])
  
          for x1, y1, x2, y2, x3, y3, is_left in hands:
              x = x3 + self.ratioWristElbow * (x3 - x2)
              y = y3 + self.ratioWristElbow * (y3 - y2)
              distanceWristElbow = math.sqrt(
                  (x3 - x2) ** 2 + (y3 - y2) ** 2
              )
              distanceElbowShoulder = math.sqrt(
                  (x2 - x1) ** 2 + (y2 - y1) ** 2
              )
              width = 1.5 * max(
                  distanceWristElbow, 0.9 * distanceElbowShoulder
              )
  
              x -= width / 2
              y -= width / 2
  
              if x < 0:
                  x = 0
              if y < 0:
                  y = 0
              width1 = width
              width2 = width
              if x + width > image_width:
                  width1 = image_width - x
              if y + width > image_height:
                  width2 = image_height - y
              width = min(width1, width2)
  
              if width >= 20:
                  detect_result.append(
                      [int(x), int(y), int(width), is_left]
                  )
  
      return detect_result
  
imports: import os
  import math
  import base64
  from typing import Callable
  import cv2
  import numpy
  import matplotlib
  from matplotlib import pyplot
  from matplotlib.figure import Figure
  from matplotlib.backends.backend_agg import FigureCanvasAgg
label_desc: Use image node_id 2 for calling the HandDetect obj's underlying member method code with example usage: obj.__call__(candidate, subset, oriImg) and returns: detect_result