class_docstr: Implement the local spatial smoothing defence approach in TensorFlow v2.
  
  | Paper link: https://arxiv.org/abs/1704.01155
  
  | Please keep in mind the limitations of defences. For more information on the limitations of this defence,
      see https://arxiv.org/abs/1803.09868 . For details on how to evaluate classifier security in general, see
      https://arxiv.org/abs/1902.06705
docstr: Create an instance of local spatial smoothing.
  
  :window_size: Size of spatial smoothing window.
  :param channels_first: Set channels first or last.
  :param clip_values: Tuple of the form `(min, max)` representing the minimum and maximum values allowed
         for features.
  :param apply_fit: True if applied during fitting/training.
  :param apply_predict: True if applied during predicting.
code: def __init__(
      self,
      window_size: int = 3,
      channels_first: bool = False,
      clip_values: Optional["CLIP_VALUES_TYPE"] = None,
      apply_fit: bool = False,
      apply_predict: bool = True,
  ) -> None:
      """
      Create an instance of local spatial smoothing.
  
      :window_size: Size of spatial smoothing window.
      :param channels_first: Set channels first or last.
      :param clip_values: Tuple of the form `(min, max)` representing the minimum and maximum values allowed
             for features.
      :param apply_fit: True if applied during fitting/training.
      :param apply_predict: True if applied during predicting.
      """
      super().__init__(apply_fit=apply_fit, apply_predict=apply_predict)
  
      self.channels_first = channels_first
      self.window_size = window_size
      self.clip_values = clip_values
      self._check_params()
  
file_path: adversarial-robustness-toolbox/art/defences/preprocessor/spatial_smoothing_tensorflow.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import Optional, Tuple, TYPE_CHECKING
  import numpy
  from art.defences.preprocessor.preprocessor import PreprocessorTensorFlowV2
label_desc: Use image node_id 1 to create a new SpatialSmoothingTensorFlowV2 object from inherited base classes: PreprocessorTensorFlowV2 with example: obj = SpatialSmoothingTensorFlowV2(window_size, channels_first, clip_values, apply_fit, apply_predict)