code: def from_rotation_matrix(
      rotation_matrix: type_alias.TensorLike,
      name: str = "axis_angle_from_rotation_matrix",
  ) -> Tuple[tf.Tensor, tf.Tensor]:
      """Converts a rotation matrix to an axis-angle representation.
  
      Note:
        In the current version the returned axis-angle representation is not unique
        for a given rotation matrix. Since a direct conversion would not really be
        faster, we first transform the rotation matrix to a quaternion, and finally
        perform the conversion from that quaternion to the corresponding axis-angle
        representation.
  
      Note:
        In the following, A1 to An are optional batch dimensions.
  
      Args:
        rotation_matrix: A tensor of shape `[A1, ..., An, 3, 3]`, where the last two
          dimensions represent a rotation matrix.
        name: A name for this op that defaults to "axis_angle_from_rotation_matrix".
  
      Returns:
        A tuple of two tensors, respectively of shape `[A1, ..., An, 3]` and
        `[A1, ..., An, 1]`, where the first tensor represents the axis, and the
        second represents the angle. The resulting axis is a normalized vector.
  
      Raises:
        ValueError: If the shape of `rotation_matrix` is not supported.
      """
      with tf.name_scope(name):
          rotation_matrix = tf.convert_to_tensor(value=rotation_matrix)
  
          shape.check_static(
              tensor=rotation_matrix,
              tensor_name="rotation_matrix",
              has_rank_greater_than=1,
              has_dim_equals=((-2, 3), (-1, 3)),
          )
          rotation_matrix = (
              rotation_matrix_3d.assert_rotation_matrix_normalized(
                  rotation_matrix
              )
          )
  
          quaternion = quaternion_lib.from_rotation_matrix(
              rotation_matrix
          )
          return from_quaternion(quaternion)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Tuple
  import tensorflow
  from tensorflow_graphics.geometry.transformation import quaternion
  from tensorflow_graphics.geometry.transformation import rotation_matrix_3d
  from tensorflow_graphics.math import vector
  from tensorflow_graphics.util import asserts
  from tensorflow_graphics.util import export_api
  from tensorflow_graphics.util import safe_ops
  from tensorflow_graphics.util import shape
  from tensorflow_graphics.util import type_alias
label_desc: Use image node_id 4 for calling a global function with example usage: from_rotation_matrix(rotation_matrix, name) and returns: from_quaternion