class_docstr: Tests saving/loading functionality of WithDBSettingsBase class.
class_docstr_tok: ["Tests","saving\/loading","functionality","of","WithDBSettingsBase","class","."]
docstr: Get an GenerationStrategy instance with random name.
docstr_tok: ["Get","an","GenerationStrategy","instance","with","random","name","."]
code: def get_random_generation_strategy(self) -> GenerationStrategy:
      """Get an GenerationStrategy instance with random name."""
  
      generation_strategy = get_generation_strategy(
          with_callable_model_kwarg=False
      )
      gs_name = "".join(
          random.choice(string.ascii_letters) for i in range(8)
      )
      generation_strategy._name = gs_name
      return generation_strategy
  
imports: import random
  import string
  from typing import Tuple
  from unittest.mock import patch
  from ax.core.base_trial import TrialStatus
  from ax.core.experiment import Experiment
  from ax.modelbridge.generation_strategy import GenerationStrategy
  from ax.service.utils.with_db_settings_base import WithDBSettingsBase
  from ax.storage.sqa_store.db import init_test_engine_and_session_factory
  from ax.storage.sqa_store.load import _load_experiment, _load_generation_strategy_by_experiment_name
  from ax.storage.sqa_store.reduced_state import GR_LARGE_MODEL_ATTRS
  from ax.storage.sqa_store.save import _save_experiment, _save_generation_strategy, _save_or_update_trials
  from ax.storage.sqa_store.structs import DBSettings
  from ax.utils.common.testutils import TestCase
  from ax.utils.testing.core_stubs import get_experiment, get_generator_run, SpecialGenerationStrategy
  from ax.utils.testing.modeling_stubs import get_generation_strategy
label_desc: Use image node_id 3 for calling the TestWithDBSettingsBase obj's underlying member method code with example usage: obj.get_random_generation_strategy() and returns: generation_strategy