class_docstr: Abstract base class for preprocessing defences.
  
  By default, the gradient is estimated using BPDA with the identity function.
      To modify, override `estimate_gradient`
docstr: Take in a dictionary of parameters and apply checks before saving them as attributes.
docstr_tok: ["Take","in","a","dictionary","of","parameters","and","apply","checks","before","saving","them","as","attributes","."]
code: def set_params(self, **kwargs) -> None:  # pragma: no cover
      """
      Take in a dictionary of parameters and apply checks before saving them as attributes.
      """
      for key, value in kwargs.items():
          if key in self.params:
              setattr(self, key, value)
      self._check_params()
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import abc
  from typing import List, Optional, Tuple, Any, TYPE_CHECKING
  import numpy
  from art import config
label_desc: Use image node_id 8 for calling the Preprocessor obj's underlying member method code with example usage: obj.set_params() without return types