code: def multiply(
      quaternion1: type_alias.TensorLike,
      quaternion2: type_alias.TensorLike,
      name: str = "quaternion_multiply",
  ) -> tf.Tensor:
      """Multiplies two quaternions.
  
      Note:
        In the following, A1 to An are optional batch dimensions.
  
      Args:
        quaternion1:  A tensor of shape `[A1, ..., An, 4]`, where the last dimension
          represents a quaternion.
        quaternion2:  A tensor of shape `[A1, ..., An, 4]`, where the last dimension
          represents a quaternion.
        name: A name for this op that defaults to "quaternion_multiply".
  
      Returns:
        A tensor of shape `[A1, ..., An, 4]` representing quaternions.
  
      Raises:
        ValueError: If the shape of `quaternion1` or `quaternion2` is not supported.
      """
      with tf.name_scope(name):
          quaternion1 = tf.convert_to_tensor(value=quaternion1)
          quaternion2 = tf.convert_to_tensor(value=quaternion2)
  
          shape.check_static(
              tensor=quaternion1,
              tensor_name="quaternion1",
              has_dim_equals=(-1, 4),
          )
          shape.check_static(
              tensor=quaternion2,
              tensor_name="quaternion2",
              has_dim_equals=(-1, 4),
          )
  
          x1, y1, z1, w1 = tf.unstack(quaternion1, axis=-1)
          x2, y2, z2, w2 = tf.unstack(quaternion2, axis=-1)
          x = x1 * w2 + y1 * z2 - z1 * y2 + w1 * x2
          y = -x1 * z2 + y1 * w2 + z1 * x2 + w1 * y2
          z = x1 * y2 - y1 * x2 + z1 * w2 + w1 * z2
          w = -x1 * x2 - y1 * y2 - z1 * z2 + w1 * w2
          return tf.stack((x, y, z, w), axis=-1)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import List
  from six.moves import range
  import tensorflow
  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 11 for calling a global function with example usage: multiply(quaternion1, quaternion2, name) and returns: tf