code: def test_build_and_apply_block(
      self, tested_block, output_shape, hparams=None, input_shape=None
  ):
      # Force graph mode
      with tf.compat.v1.Graph().as_default():
          if input_shape:
              input_tensor = tf.zeros(input_shape)
          else:
              input_tensor = tf.zeros([2, 32, 32, 3])
  
          with arg_scope(
              architecture_utils.DATA_FORMAT_OPS, data_format="NHWC"
          ):
              output = tested_block.block_build(
                  [input_tensor], is_training=True, hparams=hparams
              )
          self.assertLessEqual(len(output), 2)
          self.assertAllEqual(output[-1].shape, output_shape)
  
file_path: model_search/model_search/block_test.py
imports: from absl.testing import parameterized
  from model_search import block
  from model_search import hparam
  from model_search.architecture import architecture_utils
  import tensorflow.compat.v2
  import tf_slim
label_desc: Use image node_id 1 for calling the BlockTest obj's underlying member method code with example usage: obj.test_build_and_apply_block(tested_block, output_shape, hparams, input_shape) without return types