def caa_contrast(
        self, data: "torch.Tensor", contrast: "torch.Tensor", labels: "torch.Tensor"
    ) -> tuple["torch.Tensor", "torch.Tensor"]:
        """
        Compute the adversarial examples for contrast component.

        :param data: A tensor of a batch of original inputs to be attacked.
        :param contrast: Specify the contrast factor.
        :param labels: A tensor of a batch of the original labels to be predicted.
        :return: The perturbed data and the corresponding contrast factor.
        """
        contrast = contrast.detach().clone()
        contrast[self.is_attacked] = 1
        contrast.requires_grad_()
        sur_data = data.detach().requires_grad_()

        return self._comp_pgd(
            data=sur_data,
            labels=labels,
            attack_idx=4,
            attack_parameter=contrast,
            ori_is_attacked=self.is_attacked.clone(),
        )

        Compute the adversarial examples for contrast component.

        :param data: A tensor of a batch of original inputs to be attacked.
        :param contrast: Specify the contrast factor.
        :param labels: A tensor of a batch of the original labels to be predicted.
        :return: The perturbed data and the corresponding contrast factor.
        
art/attacks/evasion/composite_adversarial_attack.py