class_docstr: Tests trials/:experiment_name/:trial_id
docstr: Tests that we can set status for an existing trial
docstr_tok: ["Tests","that","we","can","set","status","for","an","existing","trial"]
code: def test_set_trial_status(self, client, ephemeral_storage):
      """Tests that we can set status for an existing trial"""
      storage = ephemeral_storage.storage
  
      add_experiment(storage, name="a", version=1, _id=1)
      add_trial(
          storage,
          experiment=1,
          id_override="00",
          status="completed",
          value=0,
      )
      add_trial(
          storage,
          experiment=1,
          id_override="01",
          status="completed",
          value=1,
      )
  
      response = client.simulate_get(
          "/trials/a/79a873a1146cbdcc385f53e7c14f41aa"
      )
      assert response.status == "200 OK"
      assert response.json["status"] == "completed"
  
      # Edit status and verify status was correctly updated
      response = client.simulate_get(
          "/trials/a/79a873a1146cbdcc385f53e7c14f41aa/set-status/interrupted"
      )
      assert response.status == "200 OK"
      assert response.json["status"] == "interrupted"
  
      # Verify new status when getting trial
      readonly_response = client.simulate_get(
          "/trials/a/79a873a1146cbdcc385f53e7c14f41aa"
      )
      assert readonly_response.status == "200 OK"
      assert readonly_response.json["status"] == "interrupted"
  
      trial = storage.get_trial(
          uid="79a873a1146cbdcc385f53e7c14f41aa", experiment_uid=1
      )
      assert trial.status == "interrupted"
  
imports: import copy
  import datetime
  import random
  import falcon
  from orion.core.io import experiment_builder
  from orion.core.worker.trial import Trial
label_desc: Use image node_id 4 for calling the TestTrialItem obj's underlying member method code with example usage: obj.test_set_trial_status(client, ephemeral_storage) without return types