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: Perturbs the given image `img` with the given perturbation `x`.
docstr_tok: ["Perturbs","the","given","image","`","img","`","with","the","given","perturbation","`","x","`","."]
code: def _perturb_image(
      self, x: np.ndarray, img: np.ndarray
  ) -> np.ndarray:  # pylint: disable=W0613,R0201
      """
      Perturbs the given image `img` with the given perturbation `x`.
      """
      return img
  
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 6 for calling the PixelThreshold obj's underlying member method code with example usage: obj._perturb_image(x, img) and returns: img