code: def euler2rotmat(eulers):
      # inputs' shape: (N, 3), tensors
      # rotate in the order of z, x, y
      n = eulers.size(0)
      thetax, thetay, thetaz = (
          eulers[:, 0:1],
          eulers[:, 1:2],
          eulers[:, 2:3],
      )
      matx = get_rotation_x(thetax)
      maty = get_rotation_y(thetay)
      matz = get_rotation_z(thetaz)
      rotmat = matz.matmul(matx).matmul(maty)
      # rotmat = maty.matmul(matx).matmul(matz)
      return rotmat
  
imports: import os
  import torch
  import torch.optim
  import numpy
  from sklearn.metrics import auc
label_desc: Use image node_id 7 for calling a global function with example usage: euler2rotmat(eulers) and returns: rotmat