code: def test_pool2d():
      """test cases of pool"""
      verify_pool2d(
          [1, 16, 32, 32],
          [2, 2],
          [2, 2],
          [1, 1],
          [0, 0, 0, 0],
          "avg",
          False,
          True,
      )
      verify_pool2d(
          [1, 16, 31, 31],
          [3, 3],
          [3, 3],
          [1, 1],
          [1, 2, 1, 2],
          "avg",
          False,
          True,
      )
      verify_pool2d(
          [1, 16, 32, 32],
          [2, 2],
          [2, 2],
          [1, 1],
          [1, 2, 1, 2],
          "avg",
          False,
          False,
      )
      verify_pool2d(
          [1, 16, 31, 31],
          [4, 4],
          [4, 4],
          [1, 1],
          [3, 3, 3, 3],
          "avg",
          False,
          False,
      )
      verify_pool2d(
          [1, 16, 31, 31],
          [4, 4],
          [4, 4],
          [1, 1],
          [0, 0, 0, 0],
          "avg",
          False,
          False,
      )
      verify_pool2d(
          [1, 16, 32, 32],
          [2, 3],
          [2, 2],
          [1, 1],
          [0, 0, 0, 0],
          "max",
          False,
      )
      verify_pool2d(
          [1, 16, 31, 31],
          [3, 3],
          [3, 3],
          [1, 1],
          [2, 1, 2, 1],
          "max",
          False,
      )
      verify_pool2d(
          [1, 16, 31, 31],
          [3, 3],
          [3, 3],
          [1, 1],
          [2, 1, 2, 1],
          "max",
          True,
      )
  
      verify_pool2d(
          [1, 16, 31, 31],
          [3, 3],
          [3, 3],
          [1, 1],
          [2, 1, 0, 3],
          "avg",
          False,
          True,
      )
      verify_pool2d(
          [1, 16, 32, 32],
          [2, 3],
          [2, 2],
          [1, 1],
          [0, 3, 2, 1],
          "avg",
          False,
          False,
      )
      verify_pool2d(
          [1, 16, 31, 31],
          [3, 3],
          [3, 3],
          [1, 1],
          [1, 0, 3, 2],
          "max",
          False,
      )
      verify_pool2d(
          [1, 16, 31, 31],
          [3, 3],
          [3, 3],
          [1, 1],
          [3, 2, 1, 0],
          "max",
          True,
      )
  
      # Test non-1 dilations
      verify_pool2d(
          [1, 16, 31, 31],
          [3, 3],
          [3, 3],
          [2, 1],
          [2, 1, 0, 3],
          "avg",
          False,
          True,
      )
      verify_pool2d(
          [1, 16, 32, 32],
          [2, 3],
          [2, 2],
          [2, 3],
          [0, 3, 2, 1],
          "avg",
          False,
          False,
      )
      verify_pool2d(
          [1, 16, 31, 31],
          [3, 3],
          [3, 3],
          [3, 3],
          [1, 0, 3, 2],
          "max",
          False,
      )
      verify_pool2d(
          [1, 16, 31, 31],
          [3, 3],
          [3, 3],
          [2, 2],
          [3, 2, 1, 0],
          "max",
          True,
      )
      # Test channel last
      verify_pool2d(
          [1, 32, 32, 16],
          [2, 2],
          [2, 2],
          [1, 1],
          [0, 0, 0, 0],
          "avg",
          False,
          True,
          layout="NHWC",
      )
      verify_pool2d(
          [1, 31, 31, 16],
          [3, 3],
          [3, 3],
          [1, 1],
          [1, 2, 1, 2],
          "avg",
          False,
          True,
          layout="NHWC",
      )
      verify_pool2d(
          [1, 32, 32, 16],
          [2, 2],
          [2, 2],
          [1, 1],
          [1, 2, 1, 2],
          "avg",
          False,
          False,
          layout="NHWC",
      )
      verify_pool2d(
          [1, 31, 31, 16],
          [4, 4],
          [4, 4],
          [1, 1],
          [3, 3, 3, 3],
          "avg",
          False,
          False,
          layout="NHWC",
      )
      verify_pool2d(
          [1, 31, 31, 16],
          [4, 4],
          [4, 4],
          [1, 1],
          [0, 0, 0, 0],
          "avg",
          False,
          False,
          layout="NHWC",
      )
      verify_pool2d(
          [1, 32, 32, 16],
          [2, 3],
          [2, 2],
          [1, 1],
          [0, 0, 0, 0],
          "max",
          False,
          layout="NHWC",
      )
      verify_pool2d(
          [1, 31, 31, 16],
          [3, 3],
          [3, 3],
          [1, 1],
          [2, 1, 2, 1],
          "max",
          False,
          layout="NHWC",
      )
      verify_pool2d(
          [1, 31, 31, 16],
          [3, 3],
          [3, 3],
          [1, 1],
          [2, 1, 2, 1],
          "max",
          True,
          layout="NHWC",
      )
  
      verify_pool2d(
          [1, 31, 31, 16],
          [3, 3],
          [3, 3],
          [1, 1],
          [2, 1, 0, 3],
          "avg",
          False,
          True,
          layout="NHWC",
      )
      verify_pool2d(
          [1, 32, 32, 16],
          [2, 3],
          [2, 2],
          [1, 1],
          [0, 3, 2, 1],
          "avg",
          False,
          False,
          layout="NHWC",
      )
      verify_pool2d(
          [1, 31, 31, 16],
          [3, 3],
          [3, 3],
          [1, 1],
          [1, 0, 3, 2],
          "max",
          False,
          layout="NHWC",
      )
      verify_pool2d(
          [1, 31, 31, 16],
          [3, 3],
          [3, 3],
          [1, 1],
          [3, 2, 1, 0],
          "max",
          True,
          layout="NHWC",
      )
      verify_pool2d(
          [1, 31, 31, 16],
          [3, 3],
          [3, 3],
          [2, 1],
          [2, 1, 0, 3],
          "avg",
          False,
          True,
          layout="NHWC",
      )
      verify_pool2d(
          [1, 32, 32, 16],
          [2, 3],
          [2, 2],
          [2, 3],
          [0, 3, 2, 1],
          "avg",
          False,
          False,
          layout="NHWC",
      )
      verify_pool2d(
          [1, 31, 31, 16],
          [3, 3],
          [3, 3],
          [3, 3],
          [1, 0, 3, 2],
          "max",
          False,
          layout="NHWC",
      )
      verify_pool2d(
          [1, 31, 31, 16],
          [3, 3],
          [3, 3],
          [2, 2],
          [3, 2, 1, 0],
          "max",
          True,
          layout="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 11 for calling a global function with example usage: test_pool2d() without return types