class_docstr: Helper class providing methods for saving changes made to an experiment
  if `db_settings` property is set to a non-None value on the instance.
class_docstr_tok: ["Helper","class","providing","methods","for","saving","changes","made","to","an","experiment","if","`","db_settings","`","property","is","set","to","a","non-None","value","on","the","instance","."]
docstr: Retrieve DB ids of experiment by the given name and the associated
  generation strategy. Each ID is None if corresponding object is not
  found.
docstr_tok: ["Retrieve","DB","ids","of","experiment","by","the","given","name","and","the","associated","generation","strategy",".","Each","ID","is","None","if","corresponding","object","is","not","found","."]
code: def _get_experiment_and_generation_strategy_db_id(
      self, experiment_name: str
  ) -> Tuple[Optional[int], Optional[int]]:
      """Retrieve DB ids of experiment by the given name and the associated
      generation strategy. Each ID is None if corresponding object is not
      found.
      """
      if not self.db_settings_set:
          return None, None
  
      exp_id = _get_experiment_id(
          experiment_name=experiment_name,
          config=self.db_settings.decoder.config,
      )
      if not exp_id:
          return None, None
      gs_id = get_generation_strategy_id(
          experiment_name=experiment_name,
          decoder=self.db_settings.decoder,
      )
      return exp_id, gs_id
  
imports: import re
  import time
  from logging import INFO, Logger
  from typing import Any, Dict, List, Optional, Tuple, Type
  from ax.core.base_trial import BaseTrial
  from ax.core.experiment import Experiment
  from ax.core.generation_strategy_interface import GenerationStrategyInterface
  from ax.core.generator_run import GeneratorRun
  from ax.exceptions.core import IncompatibleDependencyVersion, ObjectNotFoundError, UnsupportedError
  from ax.modelbridge.generation_strategy import GenerationStrategy
  from ax.utils.common.executils import retry_on_exception
  from ax.utils.common.logger import _round_floats_for_logging, get_logger
  from ax.utils.common.typeutils import not_none
label_desc: Use image node_id 5 for calling the WithDBSettingsBase obj's underlying member method code with example usage: obj._get_experiment_and_generation_strategy_db_id(experiment_name) and returns: exp_id,  gs_id, None,  None, None,  None