def to_quaternion(self):
        """Converts the euler angles to a quaternion."""
        q = Rotation.from_euler(
            self.sequence, [self.x, self.y, self.z], degrees=self.degrees
        )
        return Quaternion(*q.as_quat())
Converts the euler angles to a quaternion.
fiftyone/core/threed/transformation.py