code: def run_test(self, ndim, sigma, type_str):
      if ndim == 3:
          x = self.get_3d_input()
      elif ndim == 2:
          x = self.get_2d_input()
      else:
          x = self.get_1d_input()
  
      smoothing_layer = Smoothing(sigma=sigma, type_str=type_str)
      smoothed = smoothing_layer(x)
      print(smoothing_layer)
      with self.cached_session() as sess:
          out = sess.run(smoothed)
          self.assertAllClose(out.shape, x.shape.as_list())
      return out
  
file_path: NiftyNet/tests/approximated_smoothing_test.py
imports: from __future__ import absolute_import, print_function
  import numpy
  import tensorflow
  from niftynet.layer.approximated_smoothing import SmoothingLayer
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 4 for calling the SmoothingTest obj's underlying member method code with example usage: obj.run_test(ndim, sigma, type_str) and returns: out