code: def test_scheduler_can_handle_failing_jobs():
      trails_outcomes = []
      best_result = [-1]
  
      search_space = dict(a=space.Real(0, 1))
  
      def train_fn(args, reporter):
          test_should_fail = args["a"] > 0.7
          trails_outcomes.append(test_should_fail)
          if test_should_fail:
              raise Exception("Failed Trial")
          elif args["a"] > best_result[0]:
              best_result[0] = args["a"]
          reporter(epoch=1, accuracy=args["a"])
  
      scheduler = LocalSequentialScheduler(
          train_fn,
          search_space=search_space,
          resource={"num_cpus": "all", "num_gpus": 0},
          num_trials=10,
          reward_attr="accuracy",
          time_attr="epoch",
          checkpoint=None,
      )
  
      scheduler.run()
  
      actual_runs = []
      for trial in scheduler.training_history.values():
          is_failed = False
          for i in trial:
              if "traceback" in i:
                  is_failed = True
                  break
          actual_runs.append(is_failed)
  
      assert trails_outcomes == actual_runs
      assert scheduler.get_best_reward() == best_result[0]
      assert scheduler.get_best_config() == {"a": best_result[0]}
  
file_path: autogluon/core/tests/unittests/scheduler/test_seq_scheduler.py
imports: import pytest
  from autogluon.common import space
  from autogluon.core.scheduler.seq_scheduler import LocalSequentialScheduler
label_desc: Use image node_id 10 for calling a global function with example usage: test_scheduler_can_handle_failing_jobs() without return types