code: def test_keras(tmpdir):
      test_inputs = np.arange(start=0.0, stop=16.0, step=1.0).astype(
          np.float32
      )
      test_inputs = np.reshape(test_inputs, (1, 4, 4, 1))
      test_output = [[[7.5], [2.5], [4.5], [10.5], [12.5]]]
  
      inputs = tf.keras.layers.Input((None, None, 1))
      spp = SpatialPyramidPooling2D([1, 2])(inputs)
      model = tf.keras.Model(inputs=[inputs], outputs=[spp])
  
      model_path = str(tmpdir / "spp_model.h5")
      model.save(model_path)
      model = tf.keras.models.load_model(model_path)
      model_output = model.predict(test_inputs).tolist()
      assert model_output == test_output
  
file_path: addons/tensorflow_addons/layers/tests/spatial_pyramid_pooling_test.py
imports: import pytest
  import numpy
  import tensorflow
  from tensorflow_addons.layers.spatial_pyramid_pooling import SpatialPyramidPooling2D
  from tensorflow_addons.utils import test_utils
label_desc: Use image node_id 4 for calling a global function with example usage: test_keras(tmpdir) without return types