code: def test_create_lr_scheduler_with_warmup_on_combined_scheduler(
      save_history,
  ):
      # Test with a complex scheduler
      tensor = torch.ones([1], requires_grad=True)
      optimizer = torch.optim.SGD([tensor], lr=0.001)
  
      max_epochs = 25
      lr_max_value = 0.4
      num_iterations_per_epoch = 128
      num_iterations = max_epochs * num_iterations_per_epoch
      warmup_duration = 5 * num_iterations_per_epoch
      cooldown_duration = 5 * num_iterations_per_epoch
  
      scheduler_1 = LinearCyclicalScheduler(
          optimizer,
          "lr",
          start_value=lr_max_value,
          end_value=lr_max_value * 0.9,
          cycle_size=(
              num_iterations - warmup_duration - cooldown_duration
          )
          * 2,
      )
  
      scheduler_2 = LinearCyclicalScheduler(
          optimizer,
          "lr",
          start_value=lr_max_value,
          end_value=0.0,
          cycle_size=cooldown_duration * 2,
      )
  
      lr_scheduler = ConcatScheduler(
          schedulers=[scheduler_1, scheduler_2],
          durations=[
              num_iterations - warmup_duration - cooldown_duration
          ],
          save_history=False,
      )
      lr_values = [None] * num_iterations
      scheduler = create_lr_scheduler_with_warmup(
          lr_scheduler,
          warmup_start_value=0.0,
          warmup_end_value=lr_max_value,
          warmup_duration=warmup_duration,
          save_history=save_history,
          output_simulated_values=lr_values,
      )
      state_dict = scheduler.state_dict()
  
      trainer = Engine(lambda engine, batch: None)
  
      @trainer.on(Events.ITERATION_COMPLETED)
      def save_lr(engine):
          lrs.append(optimizer.param_groups[0]["lr"])
  
      trainer.add_event_handler(Events.ITERATION_STARTED, scheduler)
  
      data = [0] * num_iterations_per_epoch
  
      for _ in range(2):
          lrs = []
          trainer.run(data, max_epochs=max_epochs)
  
          assert lrs == pytest.approx([v for i, v in lr_values])
  
          if save_history:
              param_history = trainer.state.param_history["lr"]
              assert lrs == pytest.approx([v[0] for v in param_history])
  
              trainer.state.param_history = None
  
          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 19 for calling a global function with example usage: test_create_lr_scheduler_with_warmup_on_combined_scheduler(save_history) without return types