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: Determine optimal distribution of number of queries.
docstr_tok: ["Determine","optimal","distribution","of","number","of","queries","."]
code: def _opt_query_iteration(
      self, var_nq: int, var_t: int, lambda_param: float
  ) -> Tuple[List[int], int]:
      """
      Determine optimal distribution of number of queries.
      """
      coefficients = [
          lambda_param ** (-2 * i / 3) for i in range(0, var_t)
      ]
      sum_coefficients = sum(coefficients)
      opt_q = [
          round(var_nq * coefficients[i] / sum_coefficients)
          for i in range(0, var_t)
      ]
  
      if opt_q[0] > 80:
          var_t = var_t + 1
          opt_q, var_t = self._opt_query_iteration(
              var_nq, var_t, lambda_param
          )
      elif opt_q[0] < 50:
          var_t = var_t - 1
          opt_q, var_t = self._opt_query_iteration(
              var_nq, var_t, lambda_param
          )
  
      return opt_q, var_t
  
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 7 for calling the GeoDA obj's underlying member method code with example usage: obj._opt_query_iteration(var_nq, var_t, lambda_param) and returns: opt_q,  var_t