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 an adversarial example by random search.
  
  :param x: Current example.
  :param y: True label of `x`.
  :return: A random adversarial example for `x`.
docstr_tok: ["Find","an","adversarial","example","by","random","search",".",":","param","x",":","Current","example",".",":","param","y",":","True","label","of","`","x","`",".",":","return",":","A","random","adversarial","example","for","`","x","`","."]
code: def _find_random_adversarial(
      self, x: np.ndarray, y: np.ndarray
  ) -> np.ndarray:
      """
      Find an adversarial example by random search.
  
      :param x: Current example.
      :param y: True label of `x`.
      :return: A random adversarial example for `x`.
      """
      nb_calls = 0
      step_size = 0.02
      x_perturbed = x
  
      while not self._is_adversarial(x_perturbed, y):
          nb_calls += 1
          perturbation = np.random.normal(size=x.shape).astype(
              ART_NUMPY_DTYPE
          )
          x_perturbed = x + nb_calls * step_size * perturbation
          x_perturbed = np.clip(
              x_perturbed, a_min=self.clip_min, a_max=self.clip_max
          )
  
      self.nb_calls += nb_calls
  
      return x_perturbed
  
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 5 for calling the GeoDA obj's underlying member method code with example usage: obj._find_random_adversarial(x, y) and returns: x_perturbed