code: def _worker_func(
      _f_alloc_argument: Optional[str],
      _f_run_evaluator: Optional[str],
      _f_cleanup: Optional[str],
      evaluator_config: EvaluatorConfig,
      alloc_repeat: int,
      artifact_path: str,
      device_type: str,
      args_info: T_ARG_INFO_JSON_OBJ_LIST,
  ) -> List[float]:
      f_alloc_argument: T_ALLOC_ARGUMENT = (
          get_global_func_with_default_on_worker(
              _f_alloc_argument, default_alloc_argument
          )
      )
      f_run_evaluator: T_RUN_EVALUATOR = (
          get_global_func_with_default_on_worker(
              _f_run_evaluator, default_run_evaluator
          )
      )
      f_cleanup: T_CLEANUP = get_global_func_with_default_on_worker(
          _f_cleanup, default_cleanup
      )
  
      @contextmanager
      def resource_handler():
          try:
              yield
          finally:
              # Final step. Always clean up
              with Profiler.timeit("LocalRunner/cleanup"):
                  f_cleanup()
  
      with resource_handler():
          # Step 1: create the local runtime module
          with Profiler.timeit("LocalRunner/load_module"):
              rt_mod = tvm.runtime.load_module(artifact_path)
          # Step 2: Allocate input arguments
          with Profiler.timeit("LocalRunner/alloc_argument"):
              device = tvm.runtime.device(
                  dev_type=device_type, dev_id=0
              )
              repeated_args: List[T_ARGUMENT_LIST] = f_alloc_argument(
                  device,
                  args_info,
                  alloc_repeat,
              )
          # Step 3: Run time_evaluator
          with Profiler.timeit("LocalRunner/run_evaluator"):
              costs: List[float] = f_run_evaluator(
                  rt_mod,
                  device,
                  evaluator_config,
                  repeated_args,
              )
      return costs
  
imports: import logging
  from contextlib import contextmanager
  from typing import Callable, List, Optional, Union
  import subprocess
  import tvm
  from ...contrib.popen_pool import PopenPoolExecutor
  from ...runtime import Device, Module
  from ..logging import get_logger
  from ..profiler import Profiler
  from ..utils import derived_object, get_global_func_with_default_on_worker
  from .config import EvaluatorConfig
  from .runner import PyRunner, PyRunnerFuture, RunnerFuture, RunnerInput, RunnerResult
  from .utils import T_ARG_INFO_JSON_OBJ_LIST, T_ARGUMENT_LIST, alloc_argument_common, run_evaluator_common
label_desc: Use image node_id 1 for calling a global function with example usage: _worker_func(_f_alloc_argument, _f_run_evaluator, _f_cleanup, evaluator_config, alloc_repeat, artifact_path, device_type, args_info) and returns: costs