def requires_grad(self) -> bool:
        """
        Returns the requires_grad property of the underlying rotation

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

        Returns the requires_grad property of the underlying rotation

        Returns:
            The requires_grad property of the underlying tensor
        
dpkd/transformers/src/transformers/models/esm/openfold_utils/rigid_utils.py