code: def _get_expected_pooling_codegen(
      shape,
      dtype,
      typef,
      sizes,
      strides,
      padding,
      ceil_mode,
      count_include_pad,
  ):
      if len(padding) == 2:
          padding = (padding[0], padding[1], padding[0], padding[1])
      output_shape = _calculate_output_shape(
          shape, sizes, padding, strides
      )
  
      node = {
          "op": "kernel",
          "name": typef,
          "inputs": [[0, 0, 0]],
          "attrs": {
              "num_inputs": "1",
              "num_outputs": "1",
              "layout": [["NCHW"]],
              "shape": [[list(output_shape)]],
              "dtype": [[dtype]],
              "padding": [[str(p) for p in padding]],
              "strides": [[str(s) for s in strides]],
              "pool_size": [[str(s) for s in sizes]],
              "ceil_mode": [[str(1 if ceil_mode else 0)]],
          },
      }
  
      if typef == "nn.avg_pool2d" or typef == "nn.l2_pool2d":
          node["attrs"]["count_include_pad"] = [
              ["1" if count_include_pad else "0"]
          ]
  
      input = {
          "op": "input",
          "name": "",
          "attrs": {"shape": [[list(shape)]], "dtype": [[dtype]]},
      }
      return [input, node]
  
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 4 for calling a global function with example usage: _get_expected_pooling_codegen(shape, dtype, typef, sizes, strides, padding, ceil_mode, count_include_pad) and returns: list