def _is_label(self, x_0: np.ndarray, label: int | None) -> bool:
        """
        Helper method to check if self.estimator predict input with label

        :param x_0: An array with the original input
        :param label: The predicted label
        :return: True if self.estimator predicts label for x_0; False otherwise
        """
        if self.enable_clipped:
            x_0 = np.clip(x_0, self.clip_min, self.clip_max)
        pred = self.estimator.predict(np.expand_dims(x_0, axis=0), batch_size=self.batch_size)
        pred_y0 = np.argmax(pred)
        return pred_y0 == label

        Helper method to check if self.estimator predict input with label

        :param x_0: An array with the original input
        :param label: The predicted label
        :return: True if self.estimator predicts label for x_0; False otherwise
        
art/attacks/evasion/sign_opt.py