code: def verify_convolution(input_dim, filter_, padding):
      """Verify convolution"""
      dtype = "float32"
      _, c, h, width = input_dim
      out_c, _, kernel_h, kernel_w = filter_
      a_np = np.random.uniform(size=input_dim).astype(dtype)
      w_np = np.random.uniform(
          size=(out_c, c, kernel_h, kernel_w)
      ).astype(dtype)
      w_np_cm = np.transpose(w_np, axes=(2, 3, 1, 0))
      b_np = conv2d_nchw_python(a_np, w_np, [1, 1], padding)
      inputs = [("input1", datatypes.Array(c, h, width))]
      output = [
          ("output", datatypes.Array(*b_np.shape))
      ]  # pylint:disable=not-an-iterable
      builder = NeuralNetworkBuilder(inputs, output)
      builder.add_convolution(
          name="conv",
          kernel_channels=3,
          output_channels=out_c,
          height=kernel_h,
          width=kernel_w,
          stride_height=1,
          stride_width=1,
          border_mode=padding.lower(),
          groups=1,
          W=w_np_cm,
          b=None,
          has_bias=False,
          is_deconv=False,
          input_name="input1",
          output_name="output",
      )
      model = cm.models.MLModel(builder.spec)
      for target, dev in tvm.testing.enabled_targets():
          out = run_tvm_graph(
              model, target, dev, [a_np], ["input1"], output_shape=None
          )
          tvm.testing.assert_allclose(out, b_np, rtol=1e-5)
  
imports: from os import path
  from enum import Enum
  import tempfile
  import numpy
  import model_zoo
  import coremltools
  from coremltools.models.neural_network import NeuralNetworkBuilder
  from coremltools.models import datatypes
  from tensorflow import keras
  import tvm
  import tvm.topi.testing
  import tvm.testing
  from tvm.contrib import graph_executor
  from tvm.topi.testing import conv2d_nchw_python
  from tvm import relay
label_desc: Use image node_id 40 for calling a global function with example usage: verify_convolution(input_dim, filter_, padding) without return types