code: def _update_generation_strategy_in_db_if_possible(
      generation_strategy: GenerationStrategy,
      new_generator_runs: List[GeneratorRun],
      encoder: Encoder,
      decoder: Decoder,
      suppress_all_errors: bool,
      reduce_state_generator_runs: bool = False,
  ) -> None:
      start_time = time.time()
      _update_generation_strategy(
          generation_strategy=generation_strategy,
          generator_runs=new_generator_runs,
          encoder=encoder,
          decoder=decoder,
          batch_size=STORAGE_MINI_BATCH_SIZE,
          reduce_state_generator_runs=reduce_state_generator_runs,
      )
      logger.debug(
          f"Updated generation strategy {generation_strategy.name} in "
          f"{_round_floats_for_logging(time.time() - start_time)} seconds in "
          f"mini-batches of {STORAGE_MINI_BATCH_SIZE} generator runs."
      )
  
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 4 for calling a global function with example usage: _update_generation_strategy_in_db_if_possible(generation_strategy, new_generator_runs, encoder, decoder, suppress_all_errors, reduce_state_generator_runs) without return types