code: def __init__(
      self,
      work_items: Tuple[WorkOrder, ...],
      core_pool: Optional[CorePool] = None,
      cadence: float = 1.0,
  ) -> None:
      self._work_items: Tuple[WorkOrder, ...] = work_items
      self._core_pool: CorePool = core_pool or CorePool(
          0, CPU_COUNT - 4
      )
      self._cadence: float = cadence
  
      # Working state.
      self._work_queue: List[WorkOrder] = list(work_items)
      self._active_jobs: List[InProgress] = []
      self._results: Dict[WorkOrder, WorkerOutput] = {}
  
      # Debug information for ETA and error messages.
      self._start_time: float = -1
      self._durations: Dict[WorkOrder, float] = {}
      self._currently_processed: Optional[WorkOrder] = None
  
      if len(work_items) != len(set(work_items)):
          raise ValueError("Duplicate work items.")
  
imports: import math
  import multiprocessing
  import subprocess
  import textwrap
  import threading
  import time
  from typing import Dict, List, Optional, Set, Tuple, Union
  from worker.main import WorkerFailure, WorkerOutput
  from execution.work import InProgress, PYTHON_CMD, SHELL, WorkOrder
label_desc: Use image node_id 1 to create a new Runner object  with example: obj = Runner(work_items, core_pool, cadence)