def device(self) -> torch.device:
        """
        The device of the underlying rotation

        Returns:
            The device of the underlying rotation
        """
        if self._rot_mats is not None:
            return self._rot_mats.device
        elif self._quats is not None:
            return self._quats.device
        else:
            raise ValueError("Both rotations are None")

        The device of the underlying rotation

        Returns:
            The device of the underlying rotation
        
dpkd/transformers/src/transformers/models/esm/openfold_utils/rigid_utils.py