def _evaluate_transform_robustness_at_pivot(
        self,
        x: np.ndarray,
        x_noise: np.ndarray,
        x_tar_noise: np.ndarray,
        y: int,
        mask: np.ndarray,
        patches: list[np.ndarray],
        xforms: list,
        clip_min: float,
        clip_max: float,
        pivot: int,
        pts: np.ndarray | None = None,
    ) -> tuple[float, np.ndarray]:
        """
        Function as a binary search plug-in that evaluates the transform-robustness at the specified pivot.

        :param x: An array with one original input to be attacked.
        :param x_noise: x in the resolution of the noise size.
        :param x_tar_noise: x_tar in the resolution of the noise size.
        :param y: The target label.
        :param mask: An array with a mask to be applied to the adversarial perturbations. Shape needs to be
                     broadcastable to the shape of x. Any features for which the mask is zero will not be adversarially
                     perturbed.
        :param patches: List of patches from heatmap.
        :param xforms: List of transform params.
        :param clip_min: Minimum value of an example.
        :param clip_max: Maximum value of an example.
        :param pivot: Pivot point to evaluate transform-robustness at.
        :param pts: Optional. A set of points that will set the crop size in the perspective transform.
        :return: transform-robustness and mask.
        """

        best_mask = np.zeros(mask.shape)
        ordering = patches[:pivot]
        for next_patch in ordering:
            next_mask = best_mask + (np.zeros(best_mask.shape) + next_patch)
            next_mask = np.where(next_mask > 0, 1.0, 0.0)
            best_mask = next_mask

        theta = (x_tar_noise - x_noise) * best_mask
        xform_imgs = get_transformed_images(x, best_mask, xforms, 1.0, theta, self.net_size, clip_min, clip_max, pts)
        success_rate = run_predictions(self.estimator, xform_imgs, y, self.batch_size, False)

        return (success_rate, best_mask)

        Function as a binary search plug-in that evaluates the transform-robustness at the specified pivot.

        :param x: An array with one original input to be attacked.
        :param x_noise: x in the resolution of the noise size.
        :param x_tar_noise: x_tar in the resolution of the noise size.
        :param y: The target label.
        :param mask: An array with a mask to be applied to the adversarial perturbations. Shape needs to be
                     broadcastable to the shape of x. Any features for which the mask is zero will not be adversarially
                     perturbed.
        :param patches: List of patches from heatmap.
        :param xforms: List of transform params.
        :param clip_min: Minimum value of an example.
        :param clip_max: Maximum value of an example.
        :param pivot: Pivot point to evaluate transform-robustness at.
        :param pts: Optional. A set of points that will set the crop size in the perspective transform.
        :return: transform-robustness and mask.
        
art/attacks/evasion/graphite/graphite_blackbox.py