class_docstr: These attacks were originally implemented by Vargas et al. (2019) & Su et al.(2019).
  
  | One Pixel Attack Paper link: https://arxiv.org/abs/1710.08864
  | Pixel and Threshold Attack Paper link: https://arxiv.org/abs/1906.06026
docstr: Checks whether the given perturbation `adv_x` for the image `img` is successful.
docstr_tok: ["Checks","whether","the","given","perturbation","`","adv_x","`","for","the","image","`","img","`","is","successful","."]
code: def _attack_success(self, adv_x, x, target_class):
      """
      Checks whether the given perturbation `adv_x` for the image `img` is successful.
      """
      adv = self._perturb_image(adv_x, x)
  
      if self.rescale:
          adv = self.rescale_input(adv)
  
      predicted_class = np.argmax(self.estimator.predict(adv)[0])
      return bool(
          (self.targeted and predicted_class == target_class)
          or (not self.targeted and predicted_class != target_class)
      )
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from itertools import product
  from typing import List, Optional, Tuple, TYPE_CHECKING
  import numpy
  from six import string_types
  import scipy
  from scipy._lib._util import check_random_state
  from scipy.optimize import OptimizeResult, minimize
  from tqdm.auto import tqdm
  from art.config import ART_NUMPY_DTYPE
  from art.attacks.attack import EvasionAttack
  from art.estimators.estimator import BaseEstimator, NeuralNetworkMixin
  from art.estimators.classification.classifier import ClassifierMixin
  from art.utils import check_and_transform_label_format
label_desc: Use image node_id 7 for calling the PixelThreshold obj's underlying member method code with example usage: obj._attack_success(adv_x, x, target_class) and returns: bool