code: def Transform3DV1(inputs, rot_x, rot_y, isReverse):
      ## shape of inputs ==> (B, J, 3)
      ## shape of rot_x, rot_y ==> (B, 1)
      root3d = (
          inputs[:, 13:14].clone()
          if inputs.shape[1] == 17
          else inputs[:, 12:13]
      )
      inputs -= root3d
      if not isReverse:
          ## first 3D poses are rotated with Y axis
          inputs_ = inputs.clone()
          inputs_[:, :, 0] = (
              torch.cos(rot_x) * inputs[:, :, 0]
              + torch.sin(rot_x) * inputs[:, :, 2]
          )
          inputs_[:, :, 2] = (
              -torch.sin(rot_x) * inputs[:, :, 0]
              + torch.cos(rot_x) * inputs[:, :, 2]
          )
          ## second 3D poses are rotated with X axis
          inputs = inputs_.clone()
          inputs[:, :, 1] = (
              torch.cos(rot_y) * inputs_[:, :, 1]
              - torch.sin(rot_y) * inputs_[:, :, 2]
          )
          inputs[:, :, 2] = (
              torch.sin(rot_y) * inputs_[:, :, 1]
              + torch.cos(rot_y) * inputs_[:, :, 2]
          )
      else:
          ## first 3D poses are rotated with X axis
          inputs_ = inputs.clone()
          inputs_[:, :, 1] = (
              torch.cos(rot_y) * inputs[:, :, 1]
              - torch.sin(rot_y) * inputs[:, :, 2]
          )
          inputs_[:, :, 2] = (
              torch.sin(rot_y) * inputs[:, :, 1]
              + torch.cos(rot_y) * inputs[:, :, 2]
          )
          ## second 3D poses are rotated with Y axis
          inputs = inputs_.clone()
          inputs[:, :, 0] = (
              torch.cos(rot_x) * inputs_[:, :, 0]
              + torch.sin(rot_x) * inputs_[:, :, 2]
          )
          inputs[:, :, 2] = (
              -torch.sin(rot_x) * inputs_[:, :, 0]
              + torch.cos(rot_x) * inputs_[:, :, 2]
          )
      inputs += root3d
      return inputs
  
imports: import os
  import torch
  import torch.optim
  import numpy
  from sklearn.metrics import auc
label_desc: Use image node_id 12 for calling a global function with example usage: Transform3DV1(inputs, rot_x, rot_y, isReverse) and returns: inputs