code: def test_spatial_smoothing_image_data(
      art_warning, image_batch, channels_first, window_size
  ):
      try:
          test_input, test_output = image_batch
          spatial_smoothing = SpatialSmoothing(
              channels_first=channels_first, window_size=window_size
          )
  
          assert_array_equal(
              spatial_smoothing(test_input)[0], test_output
          )
  
          spatial_smoothing = SpatialSmoothing(
              channels_first=channels_first,
              window_size=window_size,
              clip_values=(0, 1),
          )
  
          spatial_smoothing(test_input)
  
      except ARTTestException as e:
          art_warning(e)
  
file_path: adversarial-robustness-toolbox/tests/defences/preprocessor/test_spatial_smoothing.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from art.defences.preprocessor import SpatialSmoothing
  from tests.utils import ARTTestException
label_desc: Use image node_id 2 for calling a global function with example usage: test_spatial_smoothing_image_data(art_warning, image_batch, channels_first, window_size) without return types