code: def legacy_learning_rate_schedule(hparams):
      """Backwards-compatible learning-rate schedule."""
      step_num = _global_step(hparams)
      warmup_steps = tf.to_float(hparams.learning_rate_warmup_steps)
      if hparams.learning_rate_decay_scheme == "noam":
          ret = (
              5000.0
              * hparams.hidden_size**-0.5
              * tf.minimum(
                  (step_num + 1) * warmup_steps**-1.5,
                  (step_num + 1) ** -0.5,
              )
          )
      else:
          warmup_steps = hparams.learning_rate_warmup_steps
          warmup = _learning_rate_warmup(warmup_steps, hparams=hparams)
          decay = _learning_rate_decay(hparams, warmup_steps)
          ret = tf.where(step_num < warmup_steps, warmup, decay)
      optimizer_correction = (
          0.002 if "adam" in hparams.optimizer else 1.0
      )
      tf.logging.info("Base learning rate: %f", hparams.learning_rate)
      return ret * optimizer_correction * hparams.learning_rate
  
file_path: tensor2tensor/tensor2tensor/utils/learning_rate.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensor2tensor.utils import mlperf_log
  import tensorflow.compat.v1
label_desc: Use image node_id 3 for calling a global function with example usage: legacy_learning_rate_schedule(hparams) and returns: unknown