code: def test_scheduler_with_param_groups(scheduler_cls, kwargs):
      t1 = torch.zeros([1], requires_grad=True)
      t2 = torch.zeros([1], requires_grad=True)
      optimizer = torch.optim.SGD(
          [{"params": t1, "lr": 0.1}, {"params": t2, "lr": 0.1}]
      )
  
      lr_scheduler = scheduler_cls(optimizer, **kwargs)
      if not isinstance(lr_scheduler, ParamScheduler):
          lr_scheduler = LRScheduler(lr_scheduler)
  
      num_iterations = 10
      max_epochs = 20
  
      state_dict = lr_scheduler.state_dict()
  
      trainer = Engine(lambda engine, batch: None)
  
      @trainer.on(Events.ITERATION_COMPLETED)
      def save_lr():
          lrs.append(
              (
                  optimizer.param_groups[0]["lr"],
                  optimizer.param_groups[1]["lr"],
              )
          )
  
      trainer.add_event_handler(Events.ITERATION_STARTED, lr_scheduler)
  
      data = [0] * num_iterations
  
      for _ in range(2):
          lrs = []
          trainer.run(data, max_epochs=max_epochs)
          assert [lr[0] for lr in lrs] == pytest.approx(
              [lr[1] for lr in lrs]
          )
          lr_scheduler.load_state_dict(state_dict)
  
imports: from unittest.mock import MagicMock, patch
  import numpy
  import pytest
  import torch
  from torch.optim.lr_scheduler import CosineAnnealingWarmRestarts, ExponentialLR, StepLR
  from ignite.engine import Engine, Events
  from ignite.handlers.param_scheduler import ConcatScheduler, CosineAnnealingScheduler, create_lr_scheduler_with_warmup, LinearCyclicalScheduler, LRScheduler, ParamGroupScheduler, ParamScheduler, PiecewiseLinear, ReduceLROnPlateauScheduler
  from tests.ignite.contrib.handlers import MockFP16DeepSpeedZeroOptimizer
label_desc: Use image node_id 23 for calling a global function with example usage: test_scheduler_with_param_groups(scheduler_cls, kwargs) without return types