code: def matrix2angle(R):
      """get three Euler angles from Rotation Matrix
      Args:
          R: (3,3). rotation matrix
      Returns:
          x: pitch
          y: yaw
          z: roll
      """
      assert isRotationMatrix
      sy = math.sqrt(R[0, 0] * R[0, 0] + R[1, 0] * R[1, 0])
  
      singular = sy < 1e-6
  
      if not singular:
          x = math.atan2(R[2, 1], R[2, 2])
          y = math.atan2(-R[2, 0], sy)
          z = math.atan2(R[1, 0], R[0, 0])
      else:
          x = math.atan2(-R[1, 2], R[1, 1])
          y = math.atan2(-R[2, 0], sy)
          z = 0
  
      # rx, ry, rz = np.rad2deg(x), np.rad2deg(y), np.rad2deg(z)
      # rx, ry, rz = x * 180 / np.pi, y * 180 / np.pi, z * 180 / np.pi
      # return rx, ry, rz
      return x, y, z
  
file_path: insightface/reconstruction/ostec/utils/ganfit_camera.py
imports: import numpy
  import math
label_desc: Use image node_id 7 for calling a global function with example usage: matrix2angle(R) and returns: x,  y,  z