code: def so3_relative_angle(
      R1: torch.Tensor,
      R2: torch.Tensor,
      cos_angle: bool = False,
      cos_bound: float = 1e-4,
      eps: float = 1e-4,
  ) -> torch.Tensor:
      """
      Calculates the relative angle (in radians) between pairs of
      rotation matrices `R1` and `R2` with `angle = acos(0.5 * (Trace(R1 R2^T)-1))`
  
      .. note::
          This corresponds to a geodesic distance on the 3D manifold of rotation
          matrices.
  
      Args:
          R1: Batch of rotation matrices of shape `(minibatch, 3, 3)`.
          R2: Batch of rotation matrices of shape `(minibatch, 3, 3)`.
          cos_angle: If==True return cosine of the relative angle rather than
              the angle itself. This can avoid the unstable calculation of `acos`.
          cos_bound: Clamps the cosine of the relative rotation angle to
              [-1 + cos_bound, 1 - cos_bound] to avoid non-finite outputs/gradients
              of the `acos` call. Note that the non-finite outputs/gradients
              are returned when the angle is requested (i.e. `cos_angle==False`)
              and the rotation angle is close to 0 or π.
          eps: Tolerance for the valid trace check of the relative rotation matrix
              in `so3_rotation_angle`.
      Returns:
          Corresponding rotation angles of shape `(minibatch,)`.
          If `cos_angle==True`, returns the cosine of the angles.
  
      Raises:
          ValueError if `R1` or `R2` is of incorrect shape.
          ValueError if `R1` or `R2` has an unexpected trace.
      """
      R12 = torch.bmm(R1, R2.permute(0, 2, 1))
      return so3_rotation_angle(
          R12, cos_angle=cos_angle, cos_bound=cos_bound, eps=eps
      )
  
file_path: pytorch3d/pytorch3d/transforms/so3.py
imports: import warnings
  from typing import Tuple
  import torch
  from pytorch3d.transforms import rotation_conversions
  from ..transforms import acos_linear_extrapolation
label_desc: Use image node_id 1 for calling a global function with example usage: so3_relative_angle(R1, R2, cos_angle, cos_bound, eps) and returns: so3_rotation_angle