code: def test_mean(dtype, shape):
      """Compare Mean output with TVM."""
  
      np.random.seed(0)
  
      zp_min = np.iinfo(dtype).min
      zp_max = np.iinfo(dtype).max
  
      inputs = {
          "a": tvm.nd.array(
              np.random.randint(
                  zp_min, high=zp_max + 1, size=shape, dtype=dtype
              )
          ),
      }
      outputs = []
      for npu in [False, True]:
          model = _get_model(
              shape,
              [1, 2],
              True,
              zp_min + 128,
              0.0784314,
              zp_min + 128,
              0.0784314,
              dtype=dtype,
          )
          mod = tei.make_module(model, [])
          outputs.append(tei.build_and_run(mod, inputs, 1, {}, npu=npu))
  
      tei.verify(outputs, dtype, 1)
  
file_path: tvm/tests/python/contrib/test_ethosn/test_mean.py
imports: import numpy
  import pytest
  import tvm
  from tvm import relay
  from tvm.testing import requires_ethosn
  from .None import infrastructure
label_desc: Use image node_id 2 for calling a global function with example usage: test_mean(dtype, shape) without return types