code: def test_spp_shape_2d():
      spp = SpatialPyramidPooling2D([1, 3, 5])
      output_shape = [256, 35, 64]
      assert (
          spp.compute_output_shape([256, None, None, 64]).as_list()
          == output_shape
      )
  
      spp = SpatialPyramidPooling2D(
          [1, 3, 5], data_format="channels_first"
      )
      output_shape = [256, 64, 35]
      assert (
          spp.compute_output_shape([256, 64, None, None]).as_list()
          == output_shape
      )
  
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 1 for calling a global function with example usage: test_spp_shape_2d() without return types