class_docstr: Tests trials/:experiment_name
docstr: Tests that trials from all ancestors are shown
docstr_tok: ["Tests","that","trials","from","all","ancestors","are","shown"]
code: def test_trials_for_all_versions(self, client, ephemeral_storage):
      """Tests that trials from all ancestors are shown"""
      storage = ephemeral_storage.storage
  
      add_experiment(storage, name="a", version=1, _id=1)
      add_experiment(storage, name="a", version=2, _id=2)
      add_experiment(storage, name="a", version=3, _id=3)
  
      # Specify values to avoid duplicates
      add_trial(storage, experiment=1, id_override="00", value=1)
      add_trial(storage, experiment=2, id_override="01", value=2)
      add_trial(storage, experiment=3, id_override="02", value=3)
  
      # Happy case default
      response = client.simulate_get("/trials/a?ancestors=true")
  
      assert response.status == "200 OK"
      assert response.json == [
          {"id": "79a873a1146cbdcc385f53e7c14f41aa"},
          {"id": "66611301f6608e9f5815b6bab606351c"},
          {"id": "8e3684c8031804022ff915bb2121e49d"},
      ]
  
      # Happy case explicitly false (call latest version test)
      response = client.simulate_get("/trials/a?ancestors=false")
  
      assert response.status == "200 OK"
      assert response.json == [
          {"id": "8e3684c8031804022ff915bb2121e49d"}
      ]
  
      # Not a boolean parameter
      response = client.simulate_get("/trials/a?ancestors=42")
  
      assert response.status == "400 Bad Request"
      assert response.json == {
          "title": "Invalid parameter",
          "description": 'The "ancestors" parameter is invalid. '
          'The value of the parameter must be "true" or "false".',
      }
  
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 5 for calling the TestTrialCollection obj's underlying member method code with example usage: obj.test_trials_for_all_versions(client, ephemeral_storage) without return types