class_docstr: Serves all the requests made to trials/ REST endpoint
docstr: Handle GET requests for trials/:experiment/:trial_id/set-status/:status
  where ``experiment`` is the user-defined name of the experiment,
  ``trial_id`` is the id of the trial, and ``status`` is the status
  to set for trial.
docstr_tok: ["Handle","GET","requests","for","trials\/",":","experiment\/",":","trial_id\/set-status\/",":","status","where","``","experiment","``","is","the","user-defined","name","of","the","experiment",",","``","trial_id","``","is","the","id","of","the","trial",",","and","``","status","``","is","the","status","to","set","for","trial","."]
code: def on_get_trial_set_status_in_experiment(
      self,
      req: Request,
      resp: Response,
      experiment_name: str,
      trial_id: str,
      status: str,
  ):
      """
      Handle GET requests for trials/:experiment/:trial_id/set-status/:status
      where ``experiment`` is the user-defined name of the experiment,
      ``trial_id`` is the id of the trial, and ``status`` is the status
      to set for trial.
      """
      experiment = retrieve_experiment(self.storage, experiment_name)
      trial = retrieve_trial(experiment, trial_id)
  
      if status != trial.status:
          if status not in Trial.allowed_stati:
              raise falcon.errors.HTTPInvalidParam(
                  "Invalid status", "status"
              )
          self.storage.update_trial(trial, status=status)
          trial.status = status
  
      response = build_trial_response(trial)
      resp.text = json.dumps(response)
  
file_path: orion/src/orion/serving/trials_resource.py
imports: import json
  import falcon.errors
  from falcon import Request, Response
  from orion.core.worker.trial import Trial
  from orion.serving.parameters import retrieve_experiment, retrieve_trial, verify_query_parameters, verify_status
  from orion.serving.responses import build_trial_response, build_trials_response
label_desc: Use image node_id 4 for calling the TrialsResource obj's underlying member method code with example usage: obj.on_get_trial_set_status_in_experiment(req, resp, experiment_name, trial_id, status) without return types