code: def _worker_func(
      _f_create_session: Union[T_CREATE_SESSION, str, None],
      _f_upload_module: Union[T_UPLOAD_MODULE, str, None],
      _f_alloc_argument: Union[T_ALLOC_ARGUMENT, str, None],
      _f_run_evaluator: Union[T_RUN_EVALUATOR, str, None],
      _f_cleanup: Union[T_CLEANUP, str, None],
      rpc_config: RPCConfig,
      evaluator_config: EvaluatorConfig,
      alloc_repeat: int,
      artifact_path: str,
      device_type: str,
      args_info: T_ARG_INFO_JSON_OBJ_LIST,
  ) -> List[float]:
      # Step 0. Get the registered functions
      f_create_session: T_CREATE_SESSION = (
          get_global_func_with_default_on_worker(
              _f_create_session, default_create_session
          )
      )
      f_upload_module: T_UPLOAD_MODULE = (
          get_global_func_with_default_on_worker(
              _f_upload_module, default_upload_module
          )
      )
      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
      )
      # Managed resources
      session: Optional[RPCSession] = None
      remote_path: Optional[str] = None
  
      @contextmanager
      def resource_handler():
          try:
              yield
          finally:
              # Final step. Always clean up
              with Profiler.timeit("RPCRunner/cleanup"):
                  f_cleanup(session, remote_path)
  
      with resource_handler():
          # Step 1. Create session
          with Profiler.timeit("RPCRunner/create_session"):
              session = f_create_session(rpc_config)
              device = session.device(dev_type=device_type, dev_id=0)
          # Step 2. Upload the module
          with Profiler.timeit("RPCRunner/upload_module"):
              _, remote_path = osp.split(artifact_path)
              local_path: str = artifact_path
              rt_mod: Module = f_upload_module(
                  session, local_path, remote_path
              )
          # Step 3: Allocate input arguments
          with Profiler.timeit("RPCRunner/alloc_argument"):
              repeated_args: List[T_ARGUMENT_LIST] = f_alloc_argument(
                  session,
                  device,
                  args_info,
                  alloc_repeat,
              )
          # Step 4: Run time_evaluator
          with Profiler.timeit("LocalRunner/run_evaluator"):
              costs: List[float] = f_run_evaluator(
                  session,
                  rt_mod,
                  device,
                  evaluator_config,
                  repeated_args,
              )
      return costs
  
imports: import concurrent.futures
  import os.path
  from contextlib import contextmanager
  from typing import Callable, List, Optional, Union
  from tvm.contrib.popen_pool import PopenPoolExecutor
  from tvm.rpc import RPCSession
  from tvm.runtime import Device, Module
  from ..logging import get_logger
  from ..profiler import Profiler
  from ..utils import derived_object, get_global_func_on_rpc_session, get_global_func_with_default_on_worker
  from .config import EvaluatorConfig, RPCConfig
  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_create_session, _f_upload_module, _f_alloc_argument, _f_run_evaluator, _f_cleanup, rpc_config, evaluator_config, alloc_repeat, artifact_path, device_type, args_info) and returns: costs