class_docstr: Implementation of the adversarial patch attack for square and rectangular images and videos in PyTorch.
  
  | Paper link: https://arxiv.org/abs/1712.09665
code: def _check_params(self) -> None:
      super()._check_params()
  
      if (
          not isinstance(self.distortion_scale_max, (float, int))
          or 1.0 <= self.distortion_scale_max < 0.0
      ):
          raise ValueError(
              "The maximum distortion scale has to be greater than or equal 0.0 or smaller than 1.0."
          )
  
      if self.patch_location is not None and not (
          isinstance(self.patch_location, tuple)
          and len(self.patch_location) == 2
          and isinstance(self.patch_location[0], int)
          and self.patch_location[0] >= 0
          and isinstance(self.patch_location[1], int)
          and self.patch_location[1] >= 0
      ):
          raise ValueError(
              "The patch location has to be either `None` or a tuple of two integers greater than or equal 0."
          )
  
      if self.patch_type not in ["circle", "square"]:
          raise ValueError(
              "The patch type has to be either `circle` or `square`."
          )
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import math
  from typing import Any, Optional, Tuple, Union, TYPE_CHECKING
  import numpy
  from tqdm.auto import trange
  from art.attacks.attack import EvasionAttack
  from art.attacks.evasion.adversarial_patch.utils import insert_transformed_patch
  from art.estimators.estimator import BaseEstimator, NeuralNetworkMixin
  from art.utils import check_and_transform_label_format, is_probability, to_categorical
  from art.summary_writer import SummaryWriter
label_desc: Use image node_id 12 for calling the AdversarialPatchPyTorch obj's underlying member method code with example usage: obj._check_params() without return types