code: def test_ethosu_pooling_matcher(
      pool_shape, stride, padding, ifm_layout, ofm_layout
  ):
      ofm_channels = 21
      if ifm_layout == "NHWC":
          ifm_shape = (1, 12, 15, ofm_channels)
      else:
          ifm_shape = (1, 12, 1 + ((ofm_channels - 1) // 16), 15, 16)
      ifm = te.placeholder(ifm_shape, dtype="int8")
      lut = te.placeholder((), dtype="uint8")
      out = pooling_compute(
          ifm=ifm,
          lut=lut,
          pooling_type="MAX",
          ifm_scale=1,
          ifm_zero_point=0,
          ofm_scale=1,
          ofm_zero_point=0,
          pool_shape=pool_shape,
          ofm_channels=ofm_channels,
          ofm_dtype="int8",
          strides=stride,
          padding=padding,
          activation="NONE",
          clip_min=0,
          clip_max=0,
          rounding_mode="TFL",
          upscale="NONE",
          ifm_layout=ifm_layout,
          ofm_layout=ofm_layout,
      )
      (ifm_transform, ifm_offset, _, _, _, _) = make_matrices(
          "ethosu_pooling",
          pool_shape,
          stride,
          padding,
          ifm_layout,
          ofm_layout,
          ofm_channels=ofm_channels,
      )
  
      device_config = cs.EthosuDeviceConfig("ethos-u55-256")
      part = match_ethosu_pooling(out, device_config)
  
      assert isinstance(part, cs.EthosuPart)
      assert len(part.propagators) == 1
      assert part.propagators[0].transform == ifm_transform
      assert part.propagators[0].offset == ifm_offset
  
imports: import pytest
  import numpy
  from tvm import te
  import tvm.contrib.ethosu.cascader
  from tvm.relay.backend.contrib.ethosu.te.pooling import match_ethosu_pooling, pooling_compute
  from .infra import make_matrices
label_desc: Use image node_id 1 for calling a global function with example usage: test_ethosu_pooling_matcher(pool_shape, stride, padding, ifm_layout, ofm_layout) without return types