code: def test_CosineWarmupScheduler__warmup(self) -> None:
      model = nn.Linear(10, 1)
      optimizer = torch.optim.SGD(
          model.parameters(), lr=1.0, momentum=0.0, weight_decay=0.0
      )
      scheduler = CosineWarmupScheduler(
          optimizer,
          warmup_epochs=3,
          max_epochs=6,
          start_value=2.0,
          end_value=0.0,
      )
      # Linear warmup
      self.assertAlmostEqual(scheduler.scale_lr(epoch=0), 2.0 * 1 / 3)
      self.assertAlmostEqual(scheduler.scale_lr(epoch=1), 2.0 * 2 / 3)
      self.assertAlmostEqual(scheduler.scale_lr(epoch=2), 2.0 * 3 / 3)
      # Cosine decay
      self.assertAlmostEqual(scheduler.scale_lr(epoch=3), 2.0 * 3 / 3)
      self.assertLess(scheduler.scale_lr(epoch=4), 2.0)
  
file_path: lightly/tests/utils/test_scheduler.py
imports: import unittest
  import torch
  from torch import nn
  from lightly.utils.scheduler import CosineWarmupScheduler, cosine_schedule
label_desc: Use image node_id 4 for calling the TestScheduler obj's underlying member method code with example usage: obj.test_CosineWarmupScheduler__warmup() without return types