code: def test_optim_config_parse_arg_by_target(self):
      basic_optim_config = {
          "_target_": "nemo.core.config.NovogradParams",
          "params": {"weight_decay": 0.001, "betas": [0.8, 0.5]},
      }
      basic_optim_config = omegaconf.OmegaConf.create(
          basic_optim_config
      )
      parsed_params = optim.parse_optimizer_args(
          "novograd", basic_optim_config
      )
      assert (
          parsed_params["weight_decay"]
          == basic_optim_config["params"]["weight_decay"]
      )
      assert (
          parsed_params["betas"][0]
          == basic_optim_config["params"]["betas"][0]
      )
      assert (
          parsed_params["betas"][1]
          == basic_optim_config["params"]["betas"][1]
      )
  
      dict_config = omegaconf.OmegaConf.create(basic_optim_config)
      parsed_params = optim.parse_optimizer_args(
          "novograd", dict_config
      )
      assert (
          parsed_params["weight_decay"]
          == dict_config["params"]["weight_decay"]
      )
      assert (
          parsed_params["betas"][0] == dict_config["params"]["betas"][0]
      )
      assert (
          parsed_params["betas"][1] == dict_config["params"]["betas"][1]
      )
  
      # Names are ignored when passing class path
      # This will be captured during optimizer instantiation
      output_config = optim.parse_optimizer_args("sgd", dict_config)
      sgd_config = vars(config.SGDParams())
      novograd_config = vars(config.NovogradParams())
  
      assert set(output_config.keys()) != set(sgd_config.keys())
      assert set(output_config.keys()) == set(novograd_config)
  
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 5 for calling the TestOptimizersSchedulers obj's underlying member method code with example usage: obj.test_optim_config_parse_arg_by_target() without return types