code: def run_jobs(jobs):
      with Scheduler(n_parallel=2) as scheduler:
          scheduler.dispatch(jobs)
          results = scheduler.collect(n_results=len(jobs), timeout=60.0)
      assert len(results) == len(jobs)
      assert all([r.id == j.id for r, j in zip(results, jobs)])
      return results
  
file_path: hypertunity/hypertunity/scheduling/tests/test_scheduler.py
imports: import os
  import tempfile
  import pytest
  from hypertunity.domain import Domain, Sample
  from hypertunity.optimisation import base
  from ..jobs import Job, SlurmJob
  from ..scheduler import Scheduler
  from .None import script
label_desc: Use image node_id 3 for calling a global function with example usage: run_jobs(jobs) and returns: results