code: def test_global_pool():
      """test cases of global_pool"""
      verify_global_pool((1, 1024, 7, 7), "avg")
      verify_global_pool((4, 1024, 7, 7), "avg")
      verify_global_pool((1, 1024, 7, 7), "max")
      verify_global_pool((4, 1024, 7, 7), "max")
      verify_global_pool((1, 7, 7, 1024), "avg", "NHWC")
      verify_global_pool((4, 7, 7, 1024), "avg", "NHWC")
      verify_global_pool((1, 7, 7, 1024), "max", "NHWC")
      verify_global_pool((4, 7, 7, 1024), "max", "NHWC")
  
imports: import math
  import pytest
  import numpy
  import tvm
  import tvm.testing
  import tvm.topi.testing
  from tvm import te, topi, TVMError
  from tvm.topi.utils import get_const_tuple
label_desc: Use image node_id 4 for calling a global function with example usage: test_global_pool() without return types