code: def make_learning_rate_decay_fn(opt):
      """Returns the learning decay function from options."""
      if opt.decay_method == "noam":
          return functools.partial(
              noam_decay,
              warmup_steps=opt.warmup_steps,
              model_size=opt.hidden_size,
          )
      elif opt.decay_method == "noamwd":
          return functools.partial(
              noamwd_decay,
              warmup_steps=opt.warmup_steps,
              model_size=opt.hidden_size,
              rate=opt.learning_rate_decay,
              decay_steps=opt.decay_steps,
              start_step=opt.start_decay_steps,
          )
      elif opt.decay_method == "rsqrt":
          return functools.partial(
              rsqrt_decay, warmup_steps=opt.warmup_steps
          )
      elif opt.start_decay_steps is not None:
          return functools.partial(
              exponential_decay,
              rate=opt.learning_rate_decay,
              decay_steps=opt.decay_steps,
              start_step=opt.start_decay_steps,
          )
  
imports: import torch
  import torch.optim
  from torch.nn.utils import clip_grad_norm_
  import operator
  import functools
  from copy import copy
  from math import sqrt
  import types
  import os
  import importlib
  from onmt.utils.misc import fn_args
label_desc: Use image node_id 2 for calling a global function with example usage: make_learning_rate_decay_fn(opt) and returns: functools, functools, functools, functools