code: def optimizer_kwargs(cfg):
      kwargs = dict(
          opt=cfg.optimizer.opt,
          lr=cfg.train.lr,
          weight_decay=cfg.optimizer.weight_decay,
          momentum=cfg.optimizer.momentum,
      )
      if cfg.optimizer.opt_eps is not None:
          kwargs["eps"] = cfg.optimizer.opt_eps
      if cfg.optimizer.opt_betas is not None:
          kwargs["betas"] = cfg.optimizer.opt_betas
      return kwargs
  
imports: from timm.optim.optim_factory import *
label_desc: Use image node_id 1 for calling a global function with example usage: optimizer_kwargs(cfg) and returns: kwargs