code: def test_invalid_avg_pool2d(count_include_pad, pool_shape, padding):
      """
      Test unsupported variants of avg_pool2d don't get partitioned.
      """
      ifm_shape = [1, 4, 4, 3]
      strides = [2, 2]
  
      def get_graph():
          x = relay.var("x", shape=ifm_shape, dtype="int8")
          x = relay.cast(x, dtype="int32")
          x = relay.nn.avg_pool2d(
              x,
              pool_shape,
              strides,
              padding=padding,
              layout="NHWC",
              count_include_pad=count_include_pad,
          )
          x = relay.cast(x, dtype="int8")
          func = relay.Function(relay.analysis.free_vars(x), x)
          return tvm.IRModule.from_expr(func)
  
      mod = relay.transform.InferType()(get_graph())
      partitioned_mod = ethosu.partition_for_ethosu(mod)
      assert tvm.ir.structural_equal(mod, partitioned_mod)
  
imports: import pytest
  import tvm
  from tvm import relay
  from tvm.relay.op.contrib import ethosu
label_desc: Use image node_id 1 for calling a global function with example usage: test_invalid_avg_pool2d(count_include_pad, pool_shape, padding) and returns: tvm