code: def batch_euler2matrix(batch_euler):
      n = batch_euler.shape[0]
      assert batch_euler.shape[1] == 3
      batch_matrix = np.zeros([n, 3, 3], dtype=np.float32)
  
      for i in range(n):
          pitch, yaw, roll = batch_euler[i]
          R = (
              Rotation.from_euler(
                  "yxz", [yaw, pitch, roll], degrees=False
              )
              .as_matrix()
              .T
          )
          batch_matrix[i] = R
  
      return batch_matrix
  
imports: import os
  import time
  import timm
  import glob
  import numpy
  import os.path
  import cv2
  import torch
  import torch.distributed
  from torch import nn
  from pathlib import Path
  from backbones import get_network
  from skimage import transform
  from scipy.spatial.transform import Rotation
label_desc: Use image node_id 1 for calling a global function with example usage: batch_euler2matrix(batch_euler) and returns: batch_matrix