code: def assert_rotation_matrix_normalized(
      matrix: type_alias.TensorLike,
      eps: type_alias.Float = 1e-3,
      name: str = "assert_rotation_matrix_normalized",
  ) -> tf.Tensor:
      """Checks whether a matrix is a rotation matrix.
  
      Note:
        In the following, A1 to An are optional batch dimensions.
  
      Args:
        matrix: A tensor of shape `[A1, ..., An, 3, 3]`, where the last two
          dimensions represent a 3d rotation matrix.
        eps: The absolute tolerance parameter.
        name: A name for this op that defaults to
          'assert_rotation_matrix_normalized'.
  
      Returns:
        The input matrix, with dependence on the assertion operator in the graph.
  
      Raises:
        tf.errors.InvalidArgumentError: If rotation_matrix_3d is not normalized.
      """
      if not FLAGS[tfg_flags.TFG_ADD_ASSERTS_TO_GRAPH].value:
          return matrix
  
      with tf.name_scope(name):
          matrix = tf.convert_to_tensor(value=matrix)
  
          shape.check_static(
              tensor=matrix,
              tensor_name="matrix",
              has_rank_greater_than=1,
              has_dim_equals=((-2, 3), (-1, 3)),
          )
  
          is_matrix_normalized = is_valid(matrix, atol=eps)
          with tf.control_dependencies(
              [
                  tf.debugging.assert_equal(
                      is_matrix_normalized,
                      tf.ones_like(is_matrix_normalized, dtype=tf.bool),
                  )
              ]
          ):
              return tf.identity(matrix)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl import flags
  from six.moves import range
  import tensorflow
  from tensorflow_graphics.geometry.transformation import rotation_matrix_common
  from tensorflow_graphics.util import asserts
  from tensorflow_graphics.util import export_api
  from tensorflow_graphics.util import shape
  from tensorflow_graphics.util import tfg_flags
  from tensorflow_graphics.util import type_alias
label_desc: Use image node_id 2 for calling a global function with example usage: assert_rotation_matrix_normalized(matrix, eps, name) and returns: matrix, tf