code: def test_register_optimizer(self):
      class TempOpt(torch.optim.SGD):
          pass
  
      class TempOptParams(config.optimizers.SGDParams):
          pass
  
      optim.register_optimizer("TempOpt", TempOpt, TempOptParams)
  
      model = TempModel()
      opt_cls = optim.get_optimizer("TempOpt")
      opt = opt_cls(model.parameters(), lr=self.INITIAL_LR)
  
      assert isinstance(opt, TempOpt)
  
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 2 for calling the TestOptimizersSchedulers obj's underlying member method code with example usage: obj.test_register_optimizer() without return types