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 _check_params(self) -> None:
      if self.norm not in [1, 2, np.inf, "inf"]:
          raise ValueError(
              'The argument norm has to be either 1, 2, np.inf, or "inf".'
          )
  
      if not isinstance(self.max_iter, int) or self.max_iter <= 0:
          raise ValueError(
              "The argument max_iter has to be of type int and larger than zero."
          )
  
      if not isinstance(self.eps, (int, float)) or self.eps <= 0.0:
          raise ValueError(
              "The argument eps has to be either of type int or float and larger than zero."
          )
  
      if (
          not isinstance(self.p_init, (int, float))
          or self.p_init <= 0.0
          or self.p_init >= 1.0
      ):
          raise ValueError(
              "The argument p_init has to be either of type int or float and in range [0, 1]."
          )
  
      if not isinstance(self.nb_restarts, int) or self.nb_restarts <= 0:
          raise ValueError(
              "The argument nb_restarts has to be of type int and larger than zero."
          )
  
      if not isinstance(self.batch_size, int) or self.batch_size <= 0:
          raise ValueError(
              "The argument batch_size has to be of type int and larger than zero."
          )
  
      if not isinstance(self.verbose, bool):
          raise ValueError(
              "The argument `verbose` has to be of type bool."
          )
  
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 5 for calling the SquareAttack obj's underlying member method code with example usage: obj._check_params() without return types