code: def test_codegen_global_pooling():
      dtype = "float32"
  
      trials = [
          ["nn.global_max_pool2d", (8, 8, 16)],
          ["nn.global_max_pool2d", (9, 9, 16)],
          ["nn.global_max_pool2d", (8, 8, 16)],
          ["nn.global_avg_pool2d", (8, 8, 16)],
          ["nn.global_avg_pool2d", (8, 8, 16)],
          ["nn.global_avg_pool2d", (9, 9, 16)],
      ]
  
      for typef, input_shape in trials:
          shape = (1, *input_shape)
          inputs = {"a"}
          args = (shape, dtype, typef)
          func = _get_global_pooling_model(*args, iter(inputs))
          exp_codegen = _get_expected_global_pooling_codegen(*args)
          verify_codegen(func, exp_codegen, 1)
  
file_path: tvm/tests/python/contrib/test_bnns/test_pooling.py
imports: import numpy
  import pytest
  import tvm
  from tvm import relay
  from tvm import testing
  from .infrastructure import skip_runtime_test, skip_codegen_test, build_and_run, verify, verify_codegen
  from .infrastructure import Device
label_desc: Use image node_id 9 for calling a global function with example usage: test_codegen_global_pooling() without return types