class_docstr: Utility to make new experiments using the same storage object.
  
  Parameters
  ----------
  storage: dict or BaseStorageProtocol, optional
      Storage object or storage configuration.
  debug: bool, optional.
      If True, force using EphemeralDB for the storage. Default: False
class_docstr_tok: ["Utility","to","make","new","experiments","using","the","same","storage","object",".","Parameters","--","--","--","--","--","storage",":","dict","or","BaseStorageProtocol",",","optional","Storage","object","or","storage","configuration",".","debug",":","bool",",","optional",".","If","True",",","force","using","EphemeralDB","for","the","storage",".","Default",":","False"]
docstr: Fetch configuration from database
  
  Parameters
  ----------
  name: str
      Name of the experiment to fetch
  version: int, optional
      Version to select. If None, last version will be selected.
      If version given is larger than largest version available,
      the largest version will be selected.
code: def fetch_config_from_db(self, name: str, version: int | None = None):
      """Fetch configuration from database
  
      Parameters
      ----------
      name: str
          Name of the experiment to fetch
      version: int, optional
          Version to select. If None, last version will be selected.
          If version given is larger than largest version available,
          the largest version will be selected.
  
      """
      configs = self.storage.fetch_experiments({"name": name})
  
      if not configs:
          return {}
  
      config = _fetch_config_version(configs, version)
  
      if len(configs) > 1 and version is None:
          log.info(
              "Many versions for experiment %s have been found. Using latest "
              "version %s.",
              name,
              config["version"],
          )
  
      log.debug("Config found in DB:\n%s", pprint.pformat(config))
  
      backward.populate_space(config, force_update=False)
      backward.update_max_broken(config)
  
      return config
  
imports: from __future__ import annotations
  import copy
  import datetime
  import getpass
  import logging
  import pprint
  import sys
  import typing
  from typing import Any, TypeVar
  import orion.core
  from orion.algo.base import BaseAlgorithm, algo_factory
  from orion.algo.space import Space
  from orion.core.evc.adapters import BaseAdapter
  from orion.core.evc.conflicts import ExperimentNameConflict, detect_conflicts
  from orion.core.io import resolve_config
  from orion.core.io.config import ConfigurationError
  from orion.core.io.database import DuplicateKeyError
  from orion.core.io.experiment_branch_builder import ExperimentBranchBuilder
  from orion.core.io.interactive_commands.branching_prompt import BranchingPrompt
  from orion.core.io.space_builder import SpaceBuilder
  from orion.core.utils import backward
  from orion.core.utils.exceptions import BranchingEvent, NoConfigurationError, NoNameError, RaceCondition
  from orion.core.worker.experiment import Experiment, Mode
  from orion.core.worker.experiment_config import ExperimentConfig
  from orion.core.worker.primary_algo import create_algo
  from orion.core.worker.warm_start import KnowledgeBase
  from orion.storage.base import setup_storage
label_desc: Use image node_id 5 for calling the ExperimentBuilder obj's underlying member method code with example usage: obj.fetch_config_from_db(name, version) and returns: config, dict