code: def rotate(joints_3d, eulers):
      rotmat = euler2rotmat(eulers)
      root = (
          joints_3d[:, 13:14]
          if joints_3d.shape[1] == 17
          else joints_3d[:, 12:13]
      )
      joints_3d = joints_3d - root
      joints_3d = joints_3d.matmul(rotmat)
      # joints_3d = rotmat.matmul(joints_3d.permute(0, 2, 1))
      # joints_3d = joints_3d.permute(0, 2, 1).contiguous()
      joints_3d = joints_3d + root
      return joints_3d
  
imports: import os
  import torch
  import torch.optim
  import numpy
  from sklearn.metrics import auc
label_desc: Use image node_id 8 for calling a global function with example usage: rotate(joints_3d, eulers) and returns: joints_3d