code: def make_model(
      shape,
      kernel_shape,
      input_zero_point,
      input_scale,
      kernel_zero_point,
      kernel_scale,
      output_zero_point,
      output_scale,
      padding,
      strides,
      dilation,
      groups,
      dtype,
      kernel_dtype,
      bias_dtype,
      out_channels,
      kernel_layout,
      enable_bias,
      relu_type,
      input_op=None,
  ):
      """Return a model and any parameters it may have"""
      if input_op:
          op = input_op
      else:
          op = relay.var("input", shape=shape, dtype=dtype)
  
      h_index = kernel_layout.index("H")
      w_index = kernel_layout.index("W")
      kernel_h = kernel_shape[h_index]
      kernel_w = kernel_shape[w_index]
      p = (0, 0, 0, 0)
      if padding == "SAME":
          p = get_same_padding(
              (shape[1], shape[2]),
              (kernel_h, kernel_w),
              dilation,
              strides,
          )
  
      rng = np.random.default_rng(12321)
      kmin, kmax = get_dtype_range(kernel_dtype)
      kernel = tvm.nd.array(
          rng.integers(
              kmin,
              high=kmax,
              size=kernel_shape,
              dtype=kernel_dtype,
          )
      )
      kernel_const = relay.const(kernel, kernel_dtype)
      conv2d_kernel_sc = (
          kernel_scale[0] if out_channels == 1 else kernel_scale
      )
      conv = relay.qnn.op.conv2d(
          op,
          kernel_const,
          input_zero_point=relay.const(input_zero_point, "int32"),
          kernel_zero_point=relay.const(kernel_zero_point, "int32"),
          input_scale=relay.const(input_scale, "float32"),
          kernel_scale=relay.const(conv2d_kernel_sc, "float32"),
          kernel_size=(kernel_h, kernel_w),
          data_layout="NHWC",
          kernel_layout=kernel_layout,
          dilation=dilation,
          strides=strides,
          groups=groups,
          channels=out_channels,
          padding=p,
          out_dtype=bias_dtype,
      )
      bias = tvm.nd.array(
          rng.integers(
              0, high=10, size=(out_channels,), dtype=bias_dtype
          )
      )
      bias_const = relay.const(bias, bias_dtype)
      last_op = (
          relay.nn.bias_add(conv, bias_const, axis=3)
          if enable_bias
          else conv
      )
      requant_input_sc = [sc * input_scale for sc in kernel_scale]
      requant_input_sc = (
          requant_input_sc[0] if out_channels == 1 else requant_input_sc
      )
      last_op = relay.qnn.op.requantize(
          last_op,
          relay.const(requant_input_sc, "float32"),
          relay.const(0, "int32"),
          relay.const(output_scale, "float32"),
          relay.const(output_zero_point, "int32"),
          out_dtype=dtype,
      )
      last_op = make_qnn_relu(
          last_op, relu_type, output_scale, output_zero_point, dtype
      )
      params = {"w": kernel, "b": bias}
      return last_op, params
  
file_path: tvm/tests/python/contrib/test_cmsisnn/test_conv2d.py
imports: import itertools
  import numpy
  import pytest
  import tvm
  from tvm import relay
  from tvm.relay.op.contrib import cmsisnn
  from tvm.testing.aot import get_dtype_range, generate_ref_data, AOTTestModel, compile_models, compile_and_run, run_and_check
  from tvm.micro.testing.aot_test_utils import AOT_USMP_CORSTONE300_RUNNER
  from .utils import make_module, get_same_padding, get_conv2d_qnn_params, get_kernel_bias_dtype, make_qnn_relu, assert_partitioned_function, assert_no_external_function, create_test_runner, CheckForPadsWithinCompositeFunc
label_desc: Use image node_id 1 for calling a global function with example usage: make_model(shape, kernel_shape, input_zero_point, input_scale, kernel_zero_point, kernel_scale, output_zero_point, output_scale, padding, strides, dilation, groups, dtype, kernel_dtype, bias_dtype, out_channels, kernel_layout, enable_bias, relu_type, input_op) and returns: last_op,  params