class_docstr: Implementation of the boundary attack from Brendel et al. (2018). This is a powerful black-box attack that
  only requires final class prediction.
  
  | Paper link: https://arxiv.org/abs/1712.04248
class_docstr_tok: ["Implementation","of","the","boundary","attack","from","Brendel","et","al",".","(","2018",")",".","This","is","a","powerful","black-box","attack","that","only","requires","final","class","prediction",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1712.04248"]
docstr: From the potential adversarial examples, find the one that has the minimum L2 distance from the original sample
  
  :param original_sample: The original input.
  :param potential_advs: Array containing the potential adversarial examples
  :return: The adversarial example that has the minimum L2 distance from the original input
docstr_tok: ["From","the","potential","adversarial","examples",",","find","the","one","that","has","the","minimum","L2","distance","from","the","original","sample",":","param","original_sample",":","The","original","input",".",":","param","potential_advs",":","Array","containing","the","potential","adversarial","examples",":","return",":","The","adversarial","example","that","has","the","minimum","L2","distance","from","the","original","input"]
code: def _best_adv(
      original_sample: np.ndarray, potential_advs: np.ndarray
  ) -> np.ndarray:
      """
      From the potential adversarial examples, find the one that has the minimum L2 distance from the original sample
  
      :param original_sample: The original input.
      :param potential_advs: Array containing the potential adversarial examples
      :return: The adversarial example that has the minimum L2 distance from the original input
      """
      shape = potential_advs.shape
      min_idx = np.linalg.norm(
          original_sample.flatten()
          - potential_advs.reshape(shape[0], -1),
          axis=1,
      ).argmin()
      return potential_advs[min_idx]
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import List, Optional, Tuple, TYPE_CHECKING
  import numpy
  from tqdm.auto import tqdm, trange
  from art.attacks.attack import EvasionAttack
  from art.config import ART_NUMPY_DTYPE
  from art.estimators.estimator import BaseEstimator
  from art.estimators.classification.classifier import ClassifierMixin
  from art.utils import compute_success, to_categorical, check_and_transform_label_format, get_labels_np_array
label_desc: Use image node_id 7 for calling the BoundaryAttack obj's underlying member method code with example usage: obj._best_adv(original_sample, potential_advs) and returns: potential_advs