code: def test_cosine_schedule__period(self) -> None:
      self.assertAlmostEqual(
          cosine_schedule(0, 1, 0, 1.0, period=10), 0.0, 6
      )
      self.assertAlmostEqual(
          cosine_schedule(3, 1, 0, 2.0, period=10), 1.30901706, 6
      )
      self.assertAlmostEqual(
          cosine_schedule(10, 1, 0, 1.0, period=10), 0.0, 6
      )
      self.assertAlmostEqual(
          cosine_schedule(15, 1, 0, 1.0, period=10), 1.0, 6
      )
      with self.assertRaises(ValueError):
          cosine_schedule(1, 10, 0.0, 1.0, period=-1)
  
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 2 for calling the TestScheduler obj's underlying member method code with example usage: obj.test_cosine_schedule__period() without return types