code: def from_rotation_translation(
      rotation_quaternion: type_alias.TensorLike,
      translation_vector: type_alias.TensorLike,
      name: str = "dual_quaternion_from_rotation_translation",
  ) -> tf.Tensor:
      """Converts a rotation matrix and translation vector to a dual quaternion.
  
      Warning:
        This function is not smooth everywhere.
  
      Note:
        In the following, A1 to An are optional batch dimensions. Rotation is
        applied first.
  
      Args:
        rotation_quaternion: A `[A1, ..., An, 4]`-tensor, where the last dimension
          represents a rotation in the form a quaternion.
        translation_vector: A `[A1, ..., An, 3]`-tensor, where the last dimension
          represents a translation vector.
        name: A name for this op that defaults to "dual_quaternion_from_rot_trans".
  
      Returns:
        A `[A1, ..., An, 8]`-tensor, where the last dimension represents a
        normalized dual quaternion.
  
      Raises:
        ValueError: If the shape of `rotation_matrix` is not supported.
      """
      with tf.name_scope(name):
          rotation_quaternion = tf.convert_to_tensor(
              value=rotation_quaternion
          )
          translation_vector = tf.convert_to_tensor(
              value=translation_vector
          )
  
          shape.check_static(
              tensor=rotation_quaternion,
              tensor_name="rotation_quaternion",
              has_rank_greater_than=1,
              has_dim_equals=(-1, 4),
          )
  
          shape.check_static(
              tensor=translation_vector,
              tensor_name="translation_vector",
              has_dim_equals=(-1, 3),
          )
  
          scalar_shape = tf.concat(
              (tf.shape(translation_vector)[:-1], (1,)), axis=-1
          )
          dtype = translation_vector.dtype
  
          quaternion_translation = tf.concat(
              (translation_vector, tf.zeros(scalar_shape, dtype)),
              axis=-1,
          )
  
          dual_quaternion_dual_part = 0.5 * quaternion.multiply(
              quaternion_translation, rotation_quaternion
          )
  
          return tf.concat(
              (rotation_quaternion, dual_quaternion_dual_part), axis=-1
          )
  
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.math import vector
  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 6 for calling a global function with example usage: from_rotation_translation(rotation_quaternion, translation_vector, name) and returns: tf