code: def test_preprocessing_defences(art_warning, get_pytorch_faster_rcnn):
      try:
          from art.defences.preprocessor.spatial_smoothing import (
              SpatialSmoothing,
          )
  
          pre_def = SpatialSmoothing()
  
          object_detector, x_test, y_test = get_pytorch_faster_rcnn
  
          object_detector.set_params(preprocessing_defences=pre_def)
  
          # Compute gradients
          grads = object_detector.loss_gradient(x=x_test, y=y_test)
  
          assert grads.shape == (2, 28, 28, 3)
  
      except ARTTestException as e:
          art_warning(e)
  
file_path: adversarial-robustness-toolbox/tests/estimators/object_detection/test_pytorch_faster_rcnn.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import numpy
  import pytest
  from tests.utils import ARTTestException
label_desc: Use image node_id 5 for calling a global function with example usage: test_preprocessing_defences(art_warning, get_pytorch_faster_rcnn) without return types