class_docstr: This class implements the `SquareAttack` attack.
  
  | Paper link: https://arxiv.org/abs/1912.00049
class_docstr_tok: ["This","class","implements","the","`","SquareAttack","`","attack",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1912.00049"]
code: def _get_percentage_of_elements(self, i_iter: int) -> float:
      i_p = i_iter / self.max_iter
      intervals = [0.001, 0.005, 0.02, 0.05, 0.1, 0.2, 0.4, 0.6, 0.8]
      p_ratio = [
          1,
          1 / 2,
          1 / 4,
          1 / 8,
          1 / 16,
          1 / 32,
          1 / 64,
          1 / 128,
          1 / 256,
          1 / 512,
      ]
      i_ratio = bisect.bisect_left(intervals, i_p)
  
      return self.p_init * p_ratio[i_ratio]
  
file_path: adversarial-robustness-toolbox/art/attacks/evasion/square_attack.py
imports: import bisect
  import logging
  import math
  import random
  from typing import Optional, Union, Callable, TYPE_CHECKING
  import numpy
  from tqdm.auto import trange
  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, get_labels_np_array
label_desc: Use image node_id 3 for calling the SquareAttack obj's underlying member method code with example usage: obj._get_percentage_of_elements(i_iter) and returns: unknown