code: def quaternion_multiply(
      a: torch.Tensor, b: torch.Tensor
  ) -> torch.Tensor:
      """
      Multiply two quaternions representing rotations, returning the quaternion
      representing their composition, i.e. the versor with nonnegative real part.
      Usual torch rules for broadcasting apply.
  
      Args:
          a: Quaternions as tensor of shape (..., 4), real part first.
          b: Quaternions as tensor of shape (..., 4), real part first.
  
      Returns:
          The product of a and b, a tensor of quaternions of shape (..., 4).
      """
      ab = quaternion_raw_multiply(a, b)
      return standardize_quaternion(ab)
  
imports: from typing import Optional
  import torch
  import torch.nn.functional
  from ..common.datatypes import Device
label_desc: Use image node_id 15 for calling a global function with example usage: quaternion_multiply(a, b) and returns: standardize_quaternion