code: def _update_active_jobs(self) -> None:
      active_jobs: List[InProgress] = []
      for job in self._active_jobs:
          self._currently_processed = job.work_order
          if not job.check_finished():
              active_jobs.append(job)
              continue
  
          result: Union[WorkerOutput, WorkerFailure] = job.result
          if isinstance(result, WorkerOutput):
              self._results[job.work_order] = result
              assert job.cpu_list is not None
              self._core_pool.release(job.cpu_list)
              self._durations[job.work_order] = job.duration
  
          else:
              assert isinstance(result, WorkerFailure)
              raise WorkerFailed(
                  cmd=job.proc.cmd, wrapped_trace=result.failure_trace
              )
      self._currently_processed = None
      self._active_jobs.clear()
      self._active_jobs.extend(active_jobs)
  
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 4 for calling the Runner obj's underlying member method code with example usage: obj._update_active_jobs() without return types