class_docstr: Local runner
  
  Parameters
  ----------
  evaluator_config: EvaluatorConfig
      The evaluator configuration.
  cooldown_sec: float
      The cooldown in seconds.
  alloc_repeat: int
      The number of times to repeat the allocation.
  f_alloc_argument: Optional[str, Callable]
      The function name to allocate the arguments or the function itself.
  f_run_evaluator: Optional[str, Callable]
      The function name to run the evaluator or the function itself.
  f_cleanup: Optional[str, Callable]
      The function name to cleanup the session or the function itself.
  pool: PopenPoolExecutor
      The popen pool executor.
  
  Attributes
  ----------
  T_ALLOC_ARGUMENT : typing._GenericAlias
      The signature of the function `f_alloc_argument`, which is:
  
      .. code-block:: python
  
      def default_alloc_argument(
          device: Device,
          args_info: T_ARG_INFO_JSON_OBJ_LIST,
          alloc_repeat: int,
      ) -> List[T_ARGUMENT_LIST]:
          ...
  
  T_RUN_EVALUATOR : typing._GenericAlias
      The signature of the function `f_run_evaluator`, which is:
  
      .. code-block:: python
  
      def default_run_evaluator(
          rt_mod: Module,
          device: Device,
          evaluator_config: EvaluatorConfig,
          repeated_args: List[T_ARGUMENT_LIST],
      ) -> List[float]:
          ...
  
  T_CLEANUP : typing._GenericAlias
      The signature of the function `f_cleanup`, which is:
  
      .. code-block:: python
  
      def default_cleanup() -> None:
          ...
class_docstr_tok: ["Local","runner","Parameters","--","--","--","--","--","evaluator_config",":","EvaluatorConfig","The","evaluator","configuration",".","cooldown_sec",":","float","The","cooldown","in","seconds",".","alloc_repeat",":","int","The","number","of","times","to","repeat","the","allocation",".","f_alloc_argument",":","Optional","[","str",",","Callable","]","The","function","name","to","allocate","the","arguments","or","the","function","itself",".","f_run_evaluator",":","Optional","[","str",",","Callable","]","The","function","name","to","run","the","evaluator","or","the","function","itself",".","f_cleanup",":","Optional","[","str",",","Callable","]","The","function","name","to","cleanup","the","session","or","the","function","itself",".","pool",":","PopenPoolExecutor","The","popen","pool","executor",".","Attributes","--","--","--","--","--","T_ALLOC_ARGUMENT",":","typing._GenericAlias","The","signature","of","the","function","`","f_alloc_argument","`",",","which","is",":","..","code-block",":",":","python","def","default_alloc_argument","(","device",":","Device",",","args_info",":","T_ARG_INFO_JSON_OBJ_LIST",",","alloc_repeat",":","int",",",")","-",">","List","[","T_ARGUMENT_LIST","]",":","...","T_RUN_EVALUATOR",":","typing._GenericAlias","The","signature","of","the","function","`","f_run_evaluator","`",",","which","is",":","..","code-block",":",":","python","def","default_run_evaluator","(","rt_mod",":","Module",",","device",":","Device",",","evaluator_config",":","EvaluatorConfig",",","repeated_args",":","List","[","T_ARGUMENT_LIST","]",",",")","-",">","List","[","float","]",":","...","T_CLEANUP",":","typing._GenericAlias","The","signature","of","the","function","`","f_cleanup","`",",","which","is",":","..","code-block",":",":","python","def","default_cleanup","(",")","-",">","None",":","..."]
code: def _sanity_check(self) -> None:
      def _check(
          f_alloc_argument,
          f_run_evaluator,
          f_cleanup,
      ) -> None:
          get_global_func_with_default_on_worker(
              name=f_alloc_argument, default=None
          )
          get_global_func_with_default_on_worker(
              name=f_run_evaluator, default=None
          )
          get_global_func_with_default_on_worker(
              name=f_cleanup, default=None
          )
  
      value = self.pool.submit(
          _check,
          self.f_alloc_argument,
          self.f_run_evaluator,
          self.f_cleanup,
      )
      value.result()
  
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 3 for calling the LocalRunner obj's underlying member method code with example usage: obj._sanity_check() without return types