code: def eulerAnglesToRotationMatrix(theta):
      """Euler rotation matrix with clockwise logic.
      Rotation
  
      Args:
          theta: list of float
              [theta_x, theta_y, theta_z]
      Returns:
          R: np.array (3, 3)
              rotation matrix of Rz*Ry*Rx
      """
      R_x = np.array(
          [
              [1, 0, 0],
              [0, math.cos(theta[0]), -math.sin(theta[0])],
              [0, math.sin(theta[0]), math.cos(theta[0])],
          ]
      )
  
      R_y = np.array(
          [
              [math.cos(theta[1]), 0, math.sin(theta[1])],
              [0, 1, 0],
              [-math.sin(theta[1]), 0, math.cos(theta[1])],
          ]
      )
  
      R_z = np.array(
          [
              [math.cos(theta[2]), -math.sin(theta[2]), 0],
              [math.sin(theta[2]), math.cos(theta[2]), 0],
              [0, 0, 1],
          ]
      )
  
      R = np.dot(R_z, np.dot(R_y, R_x))
      return R
  
file_path: ARKitScenes/threedod/benchmark_scripts/utils/rotation.py
imports: import cv2
  import math
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: eulerAnglesToRotationMatrix(theta) and returns: R