code: def Transform3D(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
      rot_x = rot_x.unsqueeze(-1)
      rot_y = rot_y.unsqueeze(-1)
      if not isReverse:
          ## first 3D poses are rotated with Y axis
          inputs = torch.cat(
              [
                  torch.cos(rot_x) * inputs[:, :, 0:1]
                  - torch.sin(rot_x) * inputs[:, :, 2:3],
                  inputs[:, :, 1:2],
                  torch.sin(rot_x) * inputs[:, :, 0:1]
                  + torch.cos(rot_x) * inputs[:, :, 2:3],
              ],
              -1,
          )
  
          ## second 3D poses are rotated with X axis
          inputs = torch.cat(
              [
                  inputs[:, :, 0:1],
                  torch.cos(rot_y) * inputs[:, :, 1:2]
                  + torch.sin(rot_y) * inputs[:, :, 2:3],
                  -torch.sin(rot_y) * inputs[:, :, 1:2]
                  + torch.cos(rot_y) * inputs[:, :, 2:3],
              ],
              -1,
          )
      else:
          ## first 3D poses are rotated with X axis
          inputs = torch.cat(
              [
                  inputs[:, :, 0:1],
                  torch.cos(rot_y) * inputs[:, :, 1:2]
                  + torch.sin(rot_y) * inputs[:, :, 2:3],
                  -torch.sin(rot_y) * inputs[:, :, 1:2]
                  + torch.cos(rot_y) * inputs[:, :, 2:3],
              ],
              -1,
          )
          ## second 3D poses are rotated with Y axis
          inputs = torch.cat(
              [
                  torch.cos(rot_x) * inputs[:, :, 0:1]
                  - torch.sin(rot_x) * inputs[:, :, 2:3],
                  inputs[:, :, 1:2],
                  torch.sin(rot_x) * inputs[:, :, 0:1]
                  + torch.cos(rot_x) * inputs[:, :, 2:3],
              ],
              -1,
          )
      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 13 for calling a global function with example usage: Transform3D(inputs, rot_x, rot_y, isReverse) and returns: inputs