code: def test_preprocessing_defences(get_pytorch_detr):
      object_detector, x_test, _ = get_pytorch_detr
  
      from art.defences.preprocessor.spatial_smoothing_pytorch import (
          SpatialSmoothingPyTorch,
      )
  
      pre_def = SpatialSmoothingPyTorch()
  
      object_detector.set_params(preprocessing_defences=pre_def)
  
      # Create labels
      result = object_detector.predict(x=x_test)
  
      y = [
          {
              "boxes": result[0]["boxes"],
              "labels": result[0]["labels"],
              "scores": np.ones_like(result[0]["labels"]),
          },
          {
              "boxes": result[1]["boxes"],
              "labels": result[1]["labels"],
              "scores": np.ones_like(result[1]["labels"]),
          },
      ]
  
      # Compute gradients
      grads = object_detector.loss_gradient(x=x_test, y=y)
  
      assert grads.shape == (2, 3, 800, 800)
  
file_path: adversarial-robustness-toolbox/tests/estimators/object_detection/test_pytorch_detection_transformer.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import numpy
  import pytest
label_desc: Use image node_id 5 for calling a global function with example usage: test_preprocessing_defences(get_pytorch_detr) without return types