code: def test_fgsm_defences(
      art_warning, fix_get_mnist_subset, image_dl_estimator
  ):
      try:
          clip_values = (0, 1)
          smooth_3x3 = SpatialSmoothingTensorFlowV2(
              window_size=3, channels_first=False
          )
          smooth_5x5 = SpatialSmoothingTensorFlowV2(
              window_size=5, channels_first=False
          )
          smooth_7x7 = SpatialSmoothingTensorFlowV2(
              window_size=7, channels_first=False
          )
          classifier_, _ = image_dl_estimator()
  
          loss_object = tf.keras.losses.CategoricalCrossentropy(
              from_logits=True
          )
          classifier = TensorFlowV2Classifier(
              clip_values=clip_values,
              model=classifier_.model,
              preprocessing_defences=[
                  smooth_3x3,
                  smooth_5x5,
                  smooth_7x7,
              ],
              loss_object=loss_object,
              input_shape=(28, 28, 1),
              nb_classes=10,
          )
          assert len(classifier.preprocessing_defences) == 3
  
          attack = FastGradientMethod(
              classifier, eps=1.0, batch_size=128
          )
          backend_test_defended_images(attack, fix_get_mnist_subset)
      except ARTTestException as e:
          art_warning(e)
  
imports: import numpy
  import pytest
  import tensorflow
  import sklearn
  import sklearn.datasets
  import sklearn.model_selection
  from art.estimators.classification.tensorflow import TensorFlowV2Classifier
  from art.estimators.classification.keras import KerasClassifier
  from art.defences.preprocessor.spatial_smoothing import SpatialSmoothing
  from art.defences.preprocessor.spatial_smoothing_tensorflow import SpatialSmoothingTensorFlowV2
  from art.attacks.evasion import FastGradientMethod, ProjectedGradientDescent
  from tests.attacks.utils import backend_test_defended_images
  from tests.utils import ARTTestException
label_desc: Use image node_id 9 for calling a global function with example usage: test_fgsm_defences(art_warning, fix_get_mnist_subset, image_dl_estimator) without return types