class_docstr: Base context class that contains runtime information for any Determined
  workflow that uses the ``tf.keras`` API.
class_docstr_tok: ["Base","context","class","that","contains","runtime","information","for","any","Determined","workflow","that","uses","the","``","tf.keras","``","API","."]
docstr: Selects the optimizers that are going to be used. This is done for backwards
  compatibility as previously optimizers were passed in as part of the compile()
  call and are now passed in as part of `self.context.wrap_optimizers()`.
docstr_tok: ["Selects","the","optimizers","that","are","going","to","be","used",".","This","is","done","for","backwards","compatibility","as","previously","optimizers","were","passed","in","as","part","of","the","compile","(",")","call","and","are","now","passed","in","as","part","of","`","self.context.wrap_optimizers","(",")","`","."]
code: def _select_optimizers(self) -> None:
      """
      Selects the optimizers that are going to be used. This is done for backwards
      compatibility as previously optimizers were passed in as part of the compile()
      call and are now passed in as part of `self.context.wrap_optimizers()`.
      """
      check.check_len(
          self._optimizers,
          0,
          "context._select_optimizers() called multiple times. Should be only called "
          "once by TFKerasTrialController.",
      )
  
      if len(self._wrapped_optimizers) > 0:
          logger.debug(
              f"Using wrapped optimizers: {self._wrapped_optimizers}."
          )
          self._optimizers = self._wrapped_optimizers
          return
  
      check.is_not_none(
          self._compiled_optimizer,
          "Please use `optimizer = self.context.wrap_optimizer(optimizer)` to wrap your "
          "optimizer. If using multiple optimizer, you should wrap your optimizer "
          "separately (calling wrap_optimizer() once for each optimizer).",
      )
  
      if self._compiled_optimizer:
          logger.info(
              "Please switch over to using `optimizer = self.context.wrap_optimizer()`."
          )
          logger.debug(
              f"Using compiled optimizer: {self._compiled_optimizer}."
          )
          self._optimizers = [self._compiled_optimizer]
  
imports: import inspect
  import logging
  from typing import Any, Callable, Dict, List, NamedTuple, Optional, Union, cast
  import tensorflow
  import determined
  from determined import errors, keras, util
  from determined.common import check
  from determined.horovod import hvd
label_desc: Use image node_id 10 for calling the TFKerasTrialContext obj's underlying member method code with example usage: obj._select_optimizers() without return types