code: def warp_affine_joints(joints, mat):
      """Apply affine transformation defined by the transform matrix on the
      joints.
  
      Args:
          joints (np.ndarray[..., 2]): Origin coordinate of joints.
          mat (np.ndarray[3, 2]): The affine matrix.
  
      Returns:
          matrix (np.ndarray[..., 2]): Result coordinate of joints.
      """
      joints = np.array(joints)
      shape = joints.shape
      joints = joints.reshape(-1, 2)
      return np.dot(
          np.concatenate((joints, joints[:, 0:1] * 0 + 1), axis=1),
          mat.T,
      ).reshape(shape)
  
imports: from scipy.optimize import linear_sum_assignment
  from collections import abc, defaultdict
  import cv2
  import numpy
  import math
  import paddle
  import paddle.nn
  from keypoint_preprocess import get_affine_mat_kernel, get_affine_transform
label_desc: Use image node_id 2 for calling a global function with example usage: warp_affine_joints(joints, mat) and returns: np