code: def afx_adam():
      """Old version - Adam."""
      hparams = transformer.transformer_base_v2()
      hparams.optimizer_adam_beta1 = 0.9
      hparams.optimizer_adam_beta2 = 0.999
      hparams.symbol_modality_num_shards = 1
      hparams.batch_size = 2048
      hparams.optimizer = "adam"
      hparams.learning_rate_schedule = (
          "constant*rsqrt_decay*linear_warmup*rsqrt_hidden_size"
      )
      hparams.learning_rate_constant = 2.0
      return hparams
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from tensor2tensor.models import transformer
  from tensor2tensor.utils import registry
label_desc: Use image node_id 2 for calling a global function with example usage: afx_adam() and returns: hparams