code: def get_optimizer(
      name: str, **kwargs: Optional[Dict[str, Any]]
  ) -> Optimizer:
      """
      Convenience method to obtain an Optimizer class and partially instantiate it with optimizer kwargs.
  
      Args:
          name: Name of the Optimizer in the registry.
          kwargs: Optional kwargs of the optimizer used during instantiation.
  
      Returns:
          a partially instantiated Optimizer
      """
      if name not in AVAILABLE_OPTIMIZERS:
          raise ValueError(
              f"Cannot resolve optimizer '{name}'. Available optimizers are : "
              f"{AVAILABLE_OPTIMIZERS.keys()}"
          )
      if name == "fused_adam":
          if not torch.cuda.is_available():
              raise ValueError(
                  f"CUDA must be available to use fused_adam."
              )
  
      optimizer = AVAILABLE_OPTIMIZERS[name]
      optimizer = partial(optimizer, **kwargs)
      return optimizer
  
file_path: NeMo/nemo/core/optim/optimizers.py
imports: import copy
  from functools import partial
  from typing import Any, Dict, Optional, Union
  import hydra
  import torch
  import torch.optim
  from omegaconf import DictConfig, OmegaConf
  from torch.optim import adadelta, adagrad, adamax, rmsprop, rprop
  from torch.optim.optimizer import Optimizer
  from nemo.core.config import OptimizerParams, get_optimizer_config, register_optimizer_params
  from nemo.core.optim.adafactor import Adafactor
  from nemo.core.optim.adan import Adan
  from nemo.core.optim.novograd import Novograd
  from nemo.utils import logging
  from nemo.utils.model_utils import maybe_update_config_version
label_desc: Use image node_id 3 for calling a global function with example usage: get_optimizer(name) and returns: optimizer