code: def run_test(self, new_size, expected_spatial_shape, is_3d=True):
      if is_3d:
          x = self.get_3d_input()
      else:
          x = self.get_2d_input()
  
      x_shape = x.shape.as_list()
      expected_shape = (
          [x_shape[0]] + list(expected_spatial_shape) + [x_shape[-1]]
      )
  
      resize_layer = LinearResizeLayer(new_size=new_size)
      resized = resize_layer(x)
      print(resize_layer)
      with self.cached_session() as sess:
          out = sess.run(resized)
          self.assertAllClose(out.shape, expected_shape)
  
file_path: NiftyNet/tests/linear_resize_test.py
imports: from __future__ import absolute_import, print_function
  import tensorflow
  from niftynet.layer.linear_resize import LinearResizeLayer
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 3 for calling the LinearResizeTest obj's underlying member method code with example usage: obj.run_test(new_size, expected_spatial_shape, is_3d) without return types