code: def test_2d_shape(self):
      x = self.get_2d_input()
      scalenet_layer = ScaleBlock("AVERAGE", n_layers=1)
      out_1 = scalenet_layer(x, is_training=True)
      print(scalenet_layer)
  
      scalenet_layer = ScaleBlock("MAX", n_layers=2)
      out_2 = scalenet_layer(x, is_training=True)
      print(scalenet_layer)
  
      with self.cached_session() as sess:
          sess.run(tf.global_variables_initializer())
          out_1 = sess.run(out_1)
          out_2 = sess.run(out_2)
          self.assertAllClose((2, 32, 32, 1), out_1.shape)
          self.assertAllClose((2, 32, 32, 1), out_2.shape)
  
file_path: NiftyNet/tests/scaleblock_test.py
imports: from __future__ import absolute_import, print_function
  import unittest
  import os
  import tensorflow
  from tensorflow.contrib.layers.python.layers import regularizers
  from niftynet.network.scalenet import ScaleBlock
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 3 for calling the ScaleBlockTest obj's underlying member method code with example usage: obj.test_2d_shape() without return types