code: def _get_static_lr(
      learning_rate=None, optimizer_class=None, hparams=None
  ):
      """Return the base static learning_rate.
      A helper function for creating the optimization function.
      """
      hparams = HParams(hparams, default_optimization_hparams())
      opt_hparams = hparams["optimizer"]
      if learning_rate is None:
          learning_rate = opt_hparams["kwargs"].get(
              "learning_rate", None
          )
      if learning_rate is None:
          # Try to get learning_rate from the default value of the
          # optimizer's argument
          opt_argspec = utils.get_default_arg_values(
              optimizer_class.__init__
          )
          learning_rate = opt_argspec.get("learning_rate", None)
      return learning_rate
  
file_path: texar/texar/tf/core/optimization.py
imports: import re
  import tensorflow
  from texar.tf.hyperparams import HParams
  from texar.tf.utils import utils
label_desc: Use image node_id 5 for calling a global function with example usage: _get_static_lr(learning_rate, optimizer_class, hparams) and returns: learning_rate