code: def test_ethosu_pooling_type_inference(
      ifm_shape,
      ifm_layout,
      ofm_shape,
      ofm_layout,
  ):
      dtype = "int8"
      ifm = relay.var("ifm", shape=ifm_shape, dtype=dtype)
      pooling_type = "AVG"
      pool_shape = (3, 2)
      ofm_channels = 55
      strides = (1, 2)
      padding = (0, 1, 2, 3)
      pooling = make_ethosu_pooling(
          ifm,
          pooling_type,
          pool_shape,
          ofm_channels,
          dtype,
          strides,
          padding,
          ifm_layout=ifm_layout,
          ofm_layout=ofm_layout,
      )
      func = relay.Function([ifm], pooling)
      func = run_opt_pass(func, relay.transform.InferType())
      assert tuple(func.body.checked_type.shape) == ofm_shape
      assert func.body.checked_type.dtype == dtype
  
imports: import pytest
  from tvm import relay, TVMError
  from tvm.relay.testing import run_opt_pass
  from .infra import make_ethosu_conv2d
  from .infra import make_ethosu_depthwise_conv2d
  from .infra import make_ethosu_pooling
  from .infra import make_ethosu_binary_elementwise
  from .infra import make_ethosu_identity
  from .infra import make_ethosu_unary_elementwise
label_desc: Use image node_id 6 for calling a global function with example usage: test_ethosu_pooling_type_inference(ifm_shape, ifm_layout, ofm_shape, ofm_layout) without return types