code: def test_meta_schedule_local_runner_add_test():
      """Test meta schedule local runner with add module"""
  
      def _check_correct_add(
          args_before: List[np.array], args_after: List[np.array]
      ) -> None:
          a_before, b_before, c_before = args_before
          a_after, b_after, c_after = args_after
          c_before = a_before + b_before
          assert (a_before == a_after).all()
          assert (b_before == b_after).all()
          assert (c_before == c_after).all()
  
      def test_alloc_argument(
          device: Device,
          args_info: T_ARG_INFO_JSON_OBJ_LIST,  # pylint: disable=unused-argument
          alloc_repeat: int,
      ) -> List[T_ARGUMENT_LIST]:
          global repeated_args_before  # pylint: disable=global-variable-undefined, invalid-name
          repeated_args_before = []
          repeated_args = local_default_alloc_argument(
              device, args_info, alloc_repeat
          )
          for args in repeated_args:
              repeated_args_before.append(
                  [arg.asnumpy() for arg in args]
              )
          return repeated_args
  
      def test_run_evaluator(
          rt_mod: Module,
          device: Device,
          evaluator_config: EvaluatorConfig,
          repeated_args: List[Any],
      ) -> List[float]:
          global repeated_args_before  # pylint: disable=global-variable-undefined, invalid-name
          repeated_args_after = []
          evaluator = rt_mod.time_evaluator(
              func_name=rt_mod.entry_name,
              dev=device,
              number=evaluator_config.number,
              repeat=evaluator_config.repeat,
              min_repeat_ms=evaluator_config.min_repeat_ms,
              f_preproc="cache_flush_cpu_non_first_arg"
              if evaluator_config.enable_cpu_cache_flush
              else "",
          )
          repeated_costs: List[List[float]] = []
          for args in repeated_args:
              device.sync()
              profile_result = evaluator(*args)
              repeated_costs.append(profile_result.results)
              repeated_args_after.append(
                  [arg.asnumpy() for arg in args]
              )
          costs = [
              float(cost)
              for cost in itertools.chain.from_iterable(repeated_costs)
          ]
          for args_before, args_after in zip(
              repeated_args_before, repeated_args_after
          ):
              _check_correct_add(args_before, args_after)
          del repeated_args_before
          return costs
  
      # Build the module
      mod = AddModule
      builder = LocalBuilder()
      (builder_result,) = builder.build(
          [BuilderInput(mod, Target("llvm"))]
      )
      assert builder_result.artifact_path is not None
      assert builder_result.error_msg is None
  
      runner_input = RunnerInput(
          builder_result.artifact_path,
          "llvm",
          [
              TensorInfo("float32", [MATMUL_M]),
              TensorInfo("float32", [MATMUL_M]),
              TensorInfo("float32", [MATMUL_M]),
          ],
      )
  
      evaluator_config = EvaluatorConfig(
          number=1,
          repeat=1,
          min_repeat_ms=0,
          enable_cpu_cache_flush=False,
      )
      runner = LocalRunner(
          timeout_sec=100,
          evaluator_config=evaluator_config,
          f_alloc_argument=test_alloc_argument,
          f_run_evaluator=test_run_evaluator,
      )
      # Run the module
      (runner_future,) = runner.run([runner_input])
      runner_result = runner_future.result()
      assert runner_result.error_msg is None
      for result in runner_result.run_secs:
          if isinstance(result, FloatImm):
              result = result.value
          assert isinstance(result, float)
          assert result >= 0.0
      _clean_build(builder_result.artifact_path)
  
imports: import itertools
  import sys
  import time
  from typing import Any, List
  import numpy
  import pytest
  import tvm
  import tvm.testing
  from tvm._ffi import register_func
  from tvm.meta_schedule.arg_info import TensorInfo
  from tvm.meta_schedule.builder import BuilderInput, LocalBuilder
  from tvm.meta_schedule.runner import EvaluatorConfig, LocalRunner, PyRunner, RPCConfig, RPCRunner, RunnerFuture, RunnerInput
  from tvm.meta_schedule.runner.local_runner import default_alloc_argument
  from tvm.meta_schedule.runner.rpc_runner import T_ARG_INFO_JSON_OBJ_LIST, T_ARGUMENT_LIST
  from tvm.meta_schedule.runner.rpc_runner import default_alloc_argument
  from tvm.meta_schedule.testing.local_rpc import LocalRPC
  from tvm.meta_schedule.utils import derived_object, get_global_func_with_default_on_worker
  from tvm.rpc import RPCSession
  from tvm.runtime import Device, Module
  from tvm.script import tir
  from tvm.target import Target
  from tvm.tir import FloatImm
label_desc: Use image node_id 13 for calling a global function with example usage: test_meta_schedule_local_runner_add_test() and returns: repeated_args, costs