code: def build_and_run(
      mod,
      inputs,
      outputs,
      params,
      device,
      enable_bnns=True,
      no_runs=1,
      tvm_ops=0,
      config=None,
  ):
      """Build and run the relay module."""
      if config is None:
          config = {}
  
      try:
          lib = build_module(
              mod, device.target, params, enable_bnns, tvm_ops
          )
      except Exception as e:
          err_msg = "The module could not be built.\n"
          if config:
              err_msg += f"The test failed with the following parameters: {config}\n"
          err_msg += str(e)
          raise Exception(err_msg)
  
      lib = update_lib(lib, device.device, device.cross_compile)
      gen_module = graph_executor.GraphModule(
          lib["default"](device.device.cpu(0))
      )
      gen_module.set_input(**inputs)
      out = []
      for _ in range(no_runs):
          gen_module.run()
          out.append([gen_module.get_output(i) for i in range(outputs)])
      return out
  
imports: from itertools import zip_longest, combinations
  import json
  import os
  import warnings
  import numpy
  import tvm
  from tvm import relay
  from tvm import rpc
  from tvm.contrib import graph_executor
  from tvm.relay.op.contrib.bnns import partition_for_bnns
  from tvm.contrib import utils
  from tvm.autotvm.measure import request_remote
  from tvm.relay.analysis import analysis
label_desc: Use image node_id 4 for calling a global function with example usage: build_and_run(mod, inputs, outputs, params, device, enable_bnns, no_runs, tvm_ops, config) and returns: out