code: def run_network(mod, params, dtype="float32"):
      def get_vm_output(
          mod, data, params, target, device, dtype="float32"
      ):
          result = relay.create_executor(
              "vm", mod=mod, device=device
          ).evaluate()(data, **params)
          return result.numpy().astype(dtype)
  
      data_shape = [
          int(x) for x in mod["main"].checked_type.arg_types[0].shape
      ]
      data = np.random.uniform(size=data_shape).astype(dtype)
      target = "llvm"
      dev = tvm.cpu(0)
  
      tvm_out = get_vm_output(
          mod,
          tvm.nd.array(data.astype(dtype)),
          params,
          target,
          dev,
          dtype,
      )
      vm_out = get_serialized_output(
          mod,
          tvm.nd.array(data.astype(dtype)),
          params=params,
          target=target,
          device=dev,
      )
      tvm.testing.assert_allclose(
          vm_out.numpy().astype(dtype), tvm_out, rtol=1e-5, atol=1e-5
      )
  
imports: import pytest
  import numpy
  import tvm
  from tvm.runtime import vm
  from tvm.relay import vm
  from tvm import relay
  from tvm.relay.scope_builder import ScopeBuilder
  from tvm.relay import transform
  from tvm.relay.prelude import Prelude
  from tvm.contrib import utils
  from tvm.relay import testing
label_desc: Use image node_id 3 for calling a global function with example usage: run_network(mod, params, dtype) and returns: result