code: def test_avg_3d():
      valid_input = np.arange(start=0.0, stop=80.0, step=1.0).astype(
          np.float32
      )
      valid_input = np.reshape(valid_input, (1, 4, 10, 2, 1))
      output = np.array(
          [[[14.0, 15.0], [24.0, 25.0]], [[54.0, 55.0], [64.0, 65.0]]]
      ).astype(np.float32)
      output = np.reshape(output, (1, 2, 2, 2, 1))
      test_utils.layer_test(
          AdaptiveAveragePooling3D,
          kwargs={
              "output_size": (2, 2, 2),
              "data_format": "channels_last",
          },
          input_data=valid_input,
          expected_output=output,
      )
  
      valid_input = np.arange(start=0.0, stop=80.0, step=1.0).astype(
          np.float32
      )
      valid_input = np.reshape(valid_input, (1, 1, 4, 10, 2))
      output = np.array(
          [[[14.0, 15.0], [24.0, 25.0]], [[54.0, 55.0], [64.0, 65.0]]]
      ).astype(np.float32)
      output = np.reshape(output, (1, 1, 2, 2, 2))
      test_utils.layer_test(
          AdaptiveAveragePooling3D,
          kwargs={
              "output_size": (2, 2, 2),
              "data_format": "channels_first",
          },
          input_data=valid_input,
          expected_output=output,
      )
  
file_path: addons/tensorflow_addons/layers/tests/adaptive_pooling_test.py
imports: import pytest
  import numpy
  from tensorflow_addons.layers.adaptive_pooling import AdaptiveAveragePooling1D, AdaptiveMaxPooling1D, AdaptiveAveragePooling2D, AdaptiveMaxPooling2D, AdaptiveAveragePooling3D, AdaptiveMaxPooling3D
  from tensorflow_addons.utils import test_utils
label_desc: Use image node_id 3 for calling a global function with example usage: test_avg_3d() without return types