code: def test_NoamAnnealing(self):
      model = TempModel()
      opt_cls = optim.get_optimizer("novograd")
      opt1 = opt_cls(model.parameters(), lr=self.INITIAL_LR)
      opt2 = opt_cls(model.parameters(), lr=self.INITIAL_LR)
  
      # No warmup case
      policy1 = optim.lr_scheduler.NoamAnnealing(
          opt1,
          d_model=self.D_MODEL,
          max_steps=self.MAX_STEPS,
          min_lr=self.MIN_LR,
      )
      policy2 = optim.lr_scheduler.NoamAnnealing(
          opt2,
          d_model=self.D_MODEL,
          max_steps=self.MAX_STEPS * 2,
          min_lr=self.MIN_LR,
      )
      initial_lr = policy1.get_last_lr()[0]
  
      assert initial_lr == self.D_MODEL ** (-0.5) * self.INITIAL_LR
  
      for i in range(self.MAX_STEPS * 2):
          assert (
              self.MIN_LR < policy1.get_last_lr()[0] <= self.INITIAL_LR
          )
          assert policy1.get_last_lr()[0] == policy2.get_last_lr()[0]
          opt1.step()
          opt2.step()
          policy1.step()
          policy2.step()
  
      # Warmup steps available
      policy1 = optim.lr_scheduler.NoamAnnealing(
          opt1,
          d_model=self.D_MODEL,
          warmup_steps=5,
          max_steps=self.MAX_STEPS,
          min_lr=self.MIN_LR,
      )
      policy2 = optim.lr_scheduler.NoamAnnealing(
          opt2,
          d_model=self.D_MODEL,
          warmup_steps=5,
          max_steps=self.MAX_STEPS * 2,
          min_lr=self.MIN_LR,
      )
      initial_lr = policy1.get_last_lr()[0]
  
      assert initial_lr < self.INITIAL_LR
  
      for i in range(self.MAX_STEPS * 2):
          if i <= 5:
              assert policy1.get_last_lr()[0] <= self.INITIAL_LR
          else:
              assert (
                  self.MIN_LR
                  < policy1.get_last_lr()[0]
                  < self.INITIAL_LR
              )
              assert (
                  policy1.get_last_lr()[0] == policy2.get_last_lr()[0]
              )
  
          opt1.step()
          opt2.step()
          policy1.step()
          policy2.step()
  
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 17 for calling the TestOptimizersSchedulers obj's underlying member method code with example usage: obj.test_NoamAnnealing() without return types