code: def test_linear_decay_scheduler():
      # Sockeye implementation
      scheduler_class, scheduler_kwargs = lr_scheduler.get_lr_scheduler(
          scheduler_type="linear-decay",
          base_learning_rate=1,
          learning_rate_reduce_factor=0,
          learning_rate_reduce_num_not_improved=0,
          learning_rate_warmup=3,
          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.LearningRateSchedulerLinearDecay
      )
  
      # Warmup term * decay term
      expected_schedule = [
          (1 / 3) * (9 / 10),
          (2 / 3) * (8 / 10),
          (3 / 3) * (7 / 10),
          (3 / 3) * (6 / 10),
          (3 / 3) * (5 / 10),
          (3 / 3) * (4 / 10),
          (3 / 3) * (3 / 10),
          (3 / 3) * (2 / 10),
          (3 / 3) * (1 / 10),
          (3 / 3) * (0 / 10),
      ]
  
      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 2 for calling a global function with example usage: test_linear_decay_scheduler() without return types