class_docstr: Implementation of the spatial transformation attack using translation and rotation of inputs. The attack conducts
  black-box queries to the target model in a grid search over possible translations and rotations to find optimal
  attack parameters.
  
  | Paper link: https://arxiv.org/abs/1712.02779
code: def _check_params(self) -> None:
      if (
          not isinstance(self.max_translation, (float, int))
          or self.max_translation < 0
          or self.max_translation > 100
      ):
          raise ValueError(
              "The maximum translation must be in the range [0, 100]."
          )
  
      if (
          not isinstance(self.num_translations, int)
          or self.num_translations <= 0
      ):
          raise ValueError(
              "The number of translations must be a positive integer."
          )
  
      if (
          not isinstance(self.max_rotation, (float, int))
          or self.max_rotation < 0
          or self.max_translation > 180
      ):
          raise ValueError(
              "The maximum rotation must be in the range [0, 180]."
          )
  
      if (
          not isinstance(self.num_rotations, int)
          or self.num_rotations <= 0
      ):
          raise ValueError(
              "The number of rotations must be a positive integer."
          )
  
      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/spatial_transformation.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import Optional, TYPE_CHECKING
  import numpy
  from scipy.ndimage import rotate, shift
  from tqdm.auto import tqdm
  from art.attacks.attack import EvasionAttack
  from art.estimators.estimator import BaseEstimator, NeuralNetworkMixin
label_desc: Use image node_id 4 for calling the SpatialTransformation obj's underlying member method code with example usage: obj._check_params() without return types