code: def test_get_optimizer(self):
      model = TempModel()
      if torch.cuda.is_available():
          model.cuda()
  
      for opt_name in AVAILABLE_OPTIMIZERS.keys():
          if opt_name == "fused_adam":
              if not torch.cuda.is_available():
                  continue
          if opt_name == "distributed_fused_adam":
              # TODO: this test fails when run with all other tests, we need to move this test to nightly or CI
              continue
              # if not torch.cuda.is_available() or not torch.distributed.is_nccl_available():
              #     continue
              # if not torch.distributed.is_initialized():
              #     torch.distributed.init_process_group(
              #         'nccl', world_size=1, rank=0, store=torch.distributed.HashStore(),
              #     )
          opt_cls = optim.get_optimizer(opt_name)
          if opt_name == "adafactor":
              # Adafactor's default mode uses relative_step without any lr.
              opt = opt_cls(model.parameters())
          else:
              opt = opt_cls(model.parameters(), lr=self.INITIAL_LR)
  
          assert isinstance(opt, AVAILABLE_OPTIMIZERS[opt_name])
  
imports: import math
  import random
  import omegaconf
  import pytest
  import pytorch_lightning
  import torch
  import torch.optim
  from pytorch_lightning.utilities import rank_zero_only
  from nemo.core import config, optim
  from nemo.core.optim.lr_scheduler import AVAILABLE_SCHEDULERS
  from nemo.core.optim.optimizers import AVAILABLE_OPTIMIZERS
  from nemo.utils import logging
label_desc: Use image node_id 1 for calling the TestOptimizersSchedulers obj's underlying member method code with example usage: obj.test_get_optimizer() without return types