code: def test_spatial_smoothing_estimate_gradient(art_warning):
      try:
          test_input = np.array([[[[1], [2]], [[3], [4]]]]).astype(
              float
          )
          test_output = np.array([[[[2], [2]], [[2], [2]]]]).astype(
              float
          )
          spatial_smoothing = SpatialSmoothingPyTorch(
              channels_first=False, window_size=2
          )
  
          test_gradients = spatial_smoothing.estimate_gradient(
              x=test_input, grad=np.ones_like(test_output).astype(float)
          )
  
          assert test_gradients.shape == test_input.shape
      except ARTTestException as e:
          art_warning(e)
  
file_path: adversarial-robustness-toolbox/tests/defences/preprocessor/test_spatial_smoothing_pytorch.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import numpy
  from numpy.testing import assert_array_equal
  import pytest
  from art.defences.preprocessor.spatial_smoothing_pytorch import SpatialSmoothingPyTorch
  from tests.utils import ARTTestException
label_desc: Use image node_id 3 for calling a global function with example usage: test_spatial_smoothing_estimate_gradient(art_warning) without return types