code: def test_scheduler():
      s1 = Scheduler()
      s2 = Scheduler({"n_jobs": 81})
      c = Scheduler.Config()
      c.n_jobs = 44
      s3 = Scheduler(c)
  
      assert s1.config["n_jobs"] == Scheduler.Config().n_jobs
      assert s2.config["n_jobs"] == 81
      assert s3.config["n_jobs"] == 44
  
      s = Scheduler({"n_jobs": 1, "prefer": "threads"})
      res = s.run(lambda x: x + 1, [(n,) for n in range(10)])
      assert sorted(res) == list(range(1, 11))
  
imports: import mock
  from tslumen.scheduling import TqdmParallel, Scheduler, delayed
label_desc: Use image node_id 2 for calling a global function with example usage: test_scheduler() without return types