code: def learning_rate_schedule(hparams):
      """Learning rate schedule based on hparams."""
      mlperf_log.transformer_print(key=mlperf_log.OPT_LR, deferred=True)
      mlperf_log.transformer_print(
          key=mlperf_log.OPT_LR_WARMUP_STEPS,
          value=hparams.learning_rate_warmup_steps,
      )
      step_num = _global_step(hparams)
      # Simulate pretraining the encoder, decoder and posterior with the same
      # learning rate schedule, and then restoring the parameters.
      # using `warm_start_from` is not compatible with actnorm DDI on TPUs.
      step_num = tf.where(
          step_num < hparams.kl_startup_steps,
          step_num,
          step_num - hparams.kl_startup_steps,
      )
      schedule_string = hparams.learning_rate_schedule
      names = schedule_string.split("*")
      names = [name.strip() for name in names if name.strip()]
      ret = tf.constant(1.0)
      for name in names:
          ret *= lr.learning_rate_factor(name, step_num, hparams)
      return ret
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from six.moves import range
  from tensor2tensor.layers import common_attention
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers import transformer_glow_layers_ops
  from tensor2tensor.models.transformer import transformer_decoder_layer
  from tensor2tensor.models.transformer import transformer_encoder
  from tensor2tensor.models.transformer import transformer_prepare_encoder
  from tensor2tensor.utils import learning_rate
  from tensor2tensor.utils import mlperf_log
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 19 for calling a global function with example usage: learning_rate_schedule(hparams) and returns: ret