code: def test_compute_intensive_ops():
      """
      Check that a partitioned function that is considered
      compute intensive is not inlined.
      """
  
      def before():
          x = relay.var("x", shape=(1, 2, 2, 4), dtype="int8")
          x = relay.nn.max_pool2d(x, layout="NHWC")
          x = relay.reshape(x, newshape=(2, 2, 4))
          return tei.make_ethosn_partition(x)
  
      mod = before()
      transformed_mod = InlineNonComputeIntensivePartitions()(mod)
      for global_var in mod.get_global_vars():
          _assert_structural_equal(
              mod[global_var], transformed_mod[global_var]
          )
  
file_path: tvm/tests/python/contrib/test_ethosn/test_inline_partitions.py
imports: import tvm
  from tvm import relay
  from tvm.testing import requires_ethosn
  from tvm.relay.op.contrib.ethosn import InlineNonComputeIntensivePartitions
  from .None import infrastructure
label_desc: Use image node_id 4 for calling a global function with example usage: test_compute_intensive_ops() and returns: tei