code: def test_inv_sqrt_decay_scheduler(learning_rate_warmup):
      # Sockeye implementation
      scheduler_class, scheduler_kwargs = lr_scheduler.get_lr_scheduler(
          scheduler_type="inv-sqrt-decay",
          base_learning_rate=1,
          learning_rate_reduce_factor=0,
          learning_rate_reduce_num_not_improved=0,
          learning_rate_warmup=learning_rate_warmup,
          max_updates=10,
      )
      assert scheduler_class is not None
      scheduler = scheduler_class(
          optimizer=torch.optim.Adam(params=[torch.zeros(0)]),
          **scheduler_kwargs,
      )
      assert isinstance(
          scheduler, lr_scheduler.LearningRateSchedulerInvSqrtDecay
      )
  
      # Reference formula from Transformer paper
      alternate_implementation = lambda t: min(
          t**-0.5, t * learning_rate_warmup**-1.5
      )
  
      expected_schedule = [
          alternate_implementation(t) for t in range(1, 11)
      ]
      actual_schedule = []
      for t in range(1, 11):
          # Check manual and automatic step numbers
          scheduler.step(t if t % 2 else None)
          actual_schedule.append(scheduler.get_last_lr()[0])
      assert np.isclose(expected_schedule, actual_schedule).all()
  
imports: import pytest
  import numpy
  import torch
  from sockeye import lr_scheduler
label_desc: Use image node_id 1 for calling a global function with example usage: test_inv_sqrt_decay_scheduler(learning_rate_warmup) without return types