code: def test_pool2d(backend, keras_model_2d, data_2d, io_type):
      model, model_type, padding = keras_model_2d
  
      config = hls4ml.utils.config_from_keras_model(
          model, default_precision="ap_fixed<32,9>", granularity="name"
      )
  
      hls_model = hls4ml.converters.convert_from_keras_model(
          model,
          hls_config=config,
          io_type=io_type,
          output_dir=str(
              test_root_path
              / f"hls4mlprj_globalplool2d_{backend}_{io_type}_{model_type}_padding_{padding}"
          ),
          backend=backend,
      )
      hls_model.compile()
  
      y_keras = model.predict(data_2d)
      y_hls = hls_model.predict(data_2d).reshape(y_keras.shape)
      np.testing.assert_allclose(
          y_keras, y_hls, rtol=0, atol=atol, verbose=True
      )
  
file_path: hls4ml/test/pytest/test_pooling.py
imports: from pathlib import Path
  import numpy
  import pytest
  from tensorflow.keras.layers import AveragePooling1D, AveragePooling2D, MaxPooling1D, MaxPooling2D
  from tensorflow.keras.models import Sequential
  import hls4ml
label_desc: Use image node_id 6 for calling a global function with example usage: test_pool2d(backend, keras_model_2d, data_2d, io_type) without return types