code: def _test_nd_output_shape(self, rank, param_dict, output_shape):
      if rank == 2:
          input_data = self.get_2d_input()
      else:
          input_data = self.get_3d_input()
  
      upsample_layer = UpBlock(**param_dict)
      output_data = upsample_layer(input_data)
      print(upsample_layer)
      with self.cached_session() as sess:
          sess.run(tf.global_variables_initializer())
          out = sess.run(output_data)
          self.assertAllClose(output_shape, out.shape)
  
file_path: NiftyNet/tests/upsample_res_block_test.py
imports: from __future__ import absolute_import, print_function
  import tensorflow
  from niftynet.layer.upsample_res_block import UpBlock
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 3 for calling the UpsampleResBlockTest obj's underlying member method code with example usage: obj._test_nd_output_shape(rank, param_dict, output_shape) without return types