class_docstr: Test :meth:`orion.client.get_experiment`
class_docstr_tok: ["Test",":","meth",":","`","orion.client.get_experiment","`"]
docstr: Tests that an instance of :class:`orion.client.experiment.ExperimentClient` is
  returned representing the latest version when none is given.
docstr_tok: ["Tests","that","an","instance","of",":","class",":","`","orion.client.experiment.ExperimentClient","`","is","returned","representing","the","latest","version","when","none","is","given","."]
code: def test_experiment_exist(self, mock_database):
      """
      Tests that an instance of :class:`orion.client.experiment.ExperimentClient` is
      returned representing the latest version when none is given.
      """
      experiment = create_experiment(
          "a",
          space={"x": "uniform(0, 10)"},
          storage=mock_database.storage,
      )
  
      experiment = get_experiment("a", storage=mock_database.storage)
  
      assert experiment
      assert isinstance(experiment, ExperimentClient)
      assert experiment.mode == "r"
  
imports: import copy
  import json
  from importlib import reload
  import pytest
  import orion.client
  import orion.client.cli
  import orion.core
  from orion.algo.random import Random
  from orion.client import get_experiment
  from orion.client.experiment import ExperimentClient
  from orion.core.io.database.ephemeraldb import EphemeralDB
  from orion.core.io.database.pickleddb import PickledDB
  from orion.core.utils.exceptions import BranchingEvent, NoConfigurationError, RaceCondition, UnsupportedOperation
  from orion.storage.base import setup_storage
  from orion.storage.legacy import Legacy
  from orion.testing import OrionState
label_desc: Use image node_id 2 for calling the TestGetExperiment obj's underlying member method code with example usage: obj.test_experiment_exist(mock_database) without return types