class_docstr: Implementation of the Geometric Decision-based Attack (GeoDA), a black-box attack requiring class predictions.
  Based on reference implementation: https://github.com/thisisalirah/GeoDA
  
  | Paper link: https://arxiv.org/abs/2003.06468
class_docstr_tok: ["Implementation","of","the","Geometric","Decision-based","Attack","(","GeoDA",")",",","a","black-box","attack","requiring","class","predictions",".","Based","on","reference","implementation",":","https",":","\/\/github.com\/thisisalirah\/GeoDA","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/2003.06468"]
docstr: Find example on decision boundary between input and random sample by binary search.
  
  :param x: Current example.
  :param y: True label of `x`.
  :param x_random: Random adversarial example of `x`.
  :return: The adversarial example at the decision boundary.
docstr_tok: ["Find","example","on","decision","boundary","between","input","and","random","sample","by","binary","search",".",":","param","x",":","Current","example",".",":","param","y",":","True","label","of","`","x","`",".",":","param","x_random",":","Random","adversarial","example","of","`","x","`",".",":","return",":","The","adversarial","example","at","the","decision","boundary","."]
code: def _binary_search(
      self,
      x: np.ndarray,
      y: np.ndarray,
      x_random: np.ndarray,
      tol: float,
  ) -> np.ndarray:
      """
      Find example on decision boundary between input and random sample by binary search.
  
      :param x: Current example.
      :param y: True label of `x`.
      :param x_random: Random adversarial example of `x`.
      :return: The adversarial example at the decision boundary.
      """
      x_adv = x_random
      x_cln = x
  
      if self.estimator.clip_values is not None:
          max_value = self.estimator.clip_values[1]
      else:
          max_value = np.max(x)
  
      while (
          np.linalg.norm(
              (x_adv.flatten() - x_cln.flatten()) / max_value, ord=2
          )
          >= tol
      ):
          self.nb_calls += 1
          x_mid = (x_cln + x_adv) / 2.0
          if self._is_adversarial(x_mid, y):
              x_adv = x_mid
          else:
              x_cln = x_mid
  
      return x_adv
  
imports: import os
  import math
  import logging
  from typing import List, Optional, Tuple, Union, TYPE_CHECKING
  import numpy
  from tqdm.auto import 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 check_and_transform_label_format, get_labels_np_array
label_desc: Use image node_id 6 for calling the GeoDA obj's underlying member method code with example usage: obj._binary_search(x, y, x_random, tol) and returns: x_adv