class_docstr: apply data augment to images and coords
  to achieve the flip, scale, rotate and half body transform effect for training image
  Args:
      trainsize (list):[w, h], Image target size
      upper_body_ids (list): The upper body joint ids
      flip_pairs (list): The left-right joints exchange order list
      pixel_std (int): The pixel std of the scale
      scale (float): The scale factor to transform the image
      rot (int): The rotate factor to transform the image
      num_joints_half_body (int): The joints threshold of the half body transform
      prob_half_body (float): The threshold of the half body transform
      flip (bool): Whether to flip the image
  Returns:
      records(dict): contain the image and coords after tranformed
class_docstr_tok: ["apply","data","augment","to","images","and","coords","to","achieve","the","flip",",","scale",",","rotate","and","half","body","transform","effect","for","training","image","Args",":","trainsize","(","list",")",":","[","w",",","h","]",",","Image","target","size","upper_body_ids","(","list",")",":","The","upper","body","joint","ids","flip_pairs","(","list",")",":","The","left-right","joints","exchange","order","list","pixel_std","(","int",")",":","The","pixel","std","of","the","scale","scale","(","float",")",":","The","scale","factor","to","transform","the","image","rot","(","int",")",":","The","rotate","factor","to","transform","the","image","num_joints_half_body","(","int",")",":","The","joints","threshold","of","the","half","body","transform","prob_half_body","(","float",")",":","The","threshold","of","the","half","body","transform","flip","(","bool",")",":","Whether","to","flip","the","image","Returns",":","records","(","dict",")",":","contain","the","image","and","coords","after","tranformed"]
code: def flip_joints(
      self, joints, joints_vis, width, matched_parts, kps2d=None
  ):
      # joints: (6, 24, 3),(num_frames, num_joints, 3)
  
      joints[:, :, 0] = width - joints[:, :, 0] - 1  # x
      if kps2d is not None:
          kps2d[:, :, 0] = width - kps2d[:, :, 0] - 1
  
      for pair in matched_parts:
          joints[:, pair[0], :], joints[:, pair[1], :] = (
              joints[:, pair[1], :],
              joints[:, pair[0], :].copy(),
          )
  
          joints_vis[:, pair[0], :], joints_vis[:, pair[1], :] = (
              joints_vis[:, pair[1], :],
              joints_vis[:, pair[0], :].copy(),
          )
  
          if kps2d is not None:
              kps2d[:, pair[0], :], kps2d[:, pair[1], :] = (
                  kps2d[:, pair[1], :],
                  kps2d[:, pair[0], :].copy(),
              )
  
      # move to zero
      joints -= joints[:, [0], :]  # (batch_size, 24, 3),numpy.ndarray
  
      return joints, joints_vis, kps2d
  
imports: from __future__ import absolute_import
  import cv2
  import numpy
  import math
  import copy
  import random
  import uuid
  from numbers import Number, Integral
  from ...modeling.keypoint_utils import get_affine_mat_kernel, warp_affine_joints, get_affine_transform, affine_transform, get_warp_matrix
  from ppdet.core.workspace import serializable
  from ppdet.utils.logger import setup_logger
  import matplotlib.pyplot
  from PIL import Image, ImageDraw
  from mpl_toolkits.mplot3d import Axes3D
label_desc: Use image node_id 3 for calling the RandomFlipHalfBody3DTransformImages obj's underlying member method code with example usage: obj.flip_joints(joints, joints_vis, width, matched_parts, kps2d) and returns: joints,  joints_vis,  kps2d