code: def test_runner_update_results():
      mock_db = mock.MagicMock()
      mock_db.get_new_results.return_value = [
          {
              "context": {"other_metric": 0.2},
              "iteration": 1,
              "objective": 0.1,
              "parameters": {"a": 1, "b": 2},
              "trial_id": 1,
          }
      ]
  
      r = sherpa.core._Runner(
          study=get_mock_study(),
          scheduler=mock.MagicMock(),
          database=mock_db,
          max_concurrent=1,
          command=["python", "test.py"],
      )
  
      # new trial
      t = get_test_trial()
      r._all_trials[t.id] = {"trial": t, "job_id": None}
      r.update_results()
      testlogger.debug(r.study.results)
      assert r.study.results["Trial-ID"].isin([1]).sum()
  
      # new observation
      mock_db.get_new_results.return_value = [
          {
              "context": {"other_metric": 0.3},
              "iteration": 2,
              "objective": 0.2,
              "parameters": {"a": 1, "b": 2},
              "trial_id": 1,
          }
      ]
      r.update_results()
      assert 0.2 in list(r.study.results["Objective"])
  
file_path: sherpa/tests/test_runner.py
imports: import sherpa
  import sherpa.core
  import sherpa.schedulers
  import sherpa.database
  from testing_utils import *
label_desc: Use image node_id 1 for calling a global function with example usage: test_runner_update_results() without return types