code: def euler_from_rotation_matrix(
      matrix: tf.Tensor, axis: int
  ) -> tf.float32:
      """Extracts the euler angle of a 3D rotation around axis.
  
      Args:
        matrix: The 3D input rotation matrix.
        axis: The rotation axis.
  
      Returns:
        The euler angle in radians around the specified axis.
      """
      tf.debugging.assert_integer(axis)
      tf.debugging.assert_less_equal(axis, 2)
      tf.debugging.assert_greater_equal(axis, 0)
      tf.debugging.assert_equal(matrix.shape, [3, 3])
      mask = np.ones((3, 3), dtype=bool)
      mask[axis, :] = False
      mask[:, axis] = False
      matrix2d = tf.reshape(tf.boolean_mask(matrix, mask), [2, 2])
      a = matrix2d[0, 1] if axis == 1 else matrix2d[1, 0]
      euler_angle = tf.math.atan2(a, matrix2d[0, 0])
      return euler_angle
  
file_path: graphics/tensorflow_graphics/projects/points_to_3Dobjects/utils/tf_utils.py
imports: import numpy
  import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: euler_from_rotation_matrix(matrix, axis) and returns: euler_angle