code: def test_batch():
      valid_input = np.array(
          # fmt: off
          [
              1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
              22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32
          ]
          # fmt: on
      ).astype(np.float32)
      valid_input = np.reshape(valid_input, (2, 2, 4, 2))
      indices = np.array(
          # fmt: off
          [
              2, 23, 8, 9, 12, 15, 40, 43, 44, 47, 72, 75, 80, 79, 62, 65, 0, 1, 30, 7,
              14, 35, 42, 21, 68, 69, 50, 51, 56, 5, 86, 63
          ]
          # fmt: on
      ).astype(np.float32)
      indices = np.reshape(indices, (2, 2, 4, 2))
      output_shape = (2, 4, 12, 2)
      expected_output = np.array(
          # fmt: off
          [
              0, 0, 1, 0, 0, 0, 0, 0, 3, 4, 0, 0, 5, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 2, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 8, 9, 0, 0, 10, 0,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 16, 0, 0, 0, 0, 0, 0, 11,
              0, 0, 12, 0, 0, 0, 14, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
              17, 18, 0, 0, 0, 30, 0, 20, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 24, 0,
              0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0,
              0, 0, 0, 27, 28, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 25, 26,
              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0,
              0, 0
          ]
          # fmt: on
      ).astype(np.float32)
      expected_output = np.reshape(expected_output, output_shape)
  
      output = MaxUnpooling2DV2(output_shape)(valid_input, indices)
      np.testing.assert_array_equal(expected_output, output)
  
file_path: addons/tensorflow_addons/layers/tests/max_unpooling_2d_v2_test.py
imports: import numpy
  import pytest
  import tensorflow
  from tensorflow_addons.layers.max_unpooling_2d_v2 import MaxUnpooling2DV2
label_desc: Use image node_id 3 for calling a global function with example usage: test_batch() without return types