code: def test_update_trial_with_id(single_with_trials, capsys):
      """Test that trial is updated properly when querying with the id"""
      trials = setup_storage()._fetch_trials({})
      trials = dict(zip((trial.id for trial in trials), trials))
      trial = setup_storage()._fetch_trials({"status": "broken"})[0]
      execute(
          f"db set -f test_single_exp id={trial.id} status=interrupted"
      )
      for new_trial in setup_storage()._fetch_trials({}):
          if new_trial.id == trial.id:
              assert (
                  new_trial.status == "interrupted"
              ), "status not changed properly"
          else:
              status_unchanged = (
                  trials[new_trial.id].status == new_trial.status
              )
              assert (
                  status_unchanged
              ), "status should not have been changed"
  
      captured = capsys.readouterr()
  
      assert captured.out.endswith("1 trials modified\n")
  
file_path: orion/tests/functional/commands/test_db_set.py
imports: import orion.core.cli
  import orion.core.io.experiment_builder
  from orion.storage.base import setup_storage
label_desc: Use image node_id 7 for calling a global function with example usage: test_update_trial_with_id(single_with_trials, capsys) without return types