code: def test_concat_scheduler_state_dict():
      tensor = torch.zeros([1], requires_grad=True)
      optimizer = torch.optim.SGD([tensor], lr=0)
      scheduler_1 = LinearCyclicalScheduler(
          optimizer, "lr", start_value=1.0, end_value=0.0, cycle_size=10
      )
      scheduler_2 = CosineAnnealingScheduler(
          optimizer, "lr", start_value=0.0, end_value=1.0, cycle_size=10
      )
      durations = [10]
      concat_scheduler = ConcatScheduler(
          schedulers=[scheduler_1, scheduler_2],
          durations=durations,
          save_history=False,
      )
  
      steps = 0
      for i in range(5):
          concat_scheduler(engine=None)
          steps += 1
  
      state_dict = concat_scheduler.state_dict()
  
      assert state_dict["durations"] == durations
      assert state_dict["_current_duration"] == durations[0] - steps
      assert state_dict["_scheduler_index"] == 0
  
      for _ in range(20):
          concat_scheduler(None, None)
  
      concat_scheduler.load_state_dict(state_dict)
      assert concat_scheduler.durations == durations
      assert concat_scheduler._current_duration == durations[0] - steps
      assert id(concat_scheduler._current_scheduler) == id(scheduler_1)
  
      with pytest.raises(
          ValueError,
          match=r"Required state attribute 'schedulers' is absent in provided state_dict",
      ):
          concat_scheduler.load_state_dict({"a": 1})
  
      with pytest.raises(
          ValueError,
          match=r"Input state_dict contains 0 state_dicts of concatenated schedulers",
      ):
          concat_scheduler.load_state_dict({"schedulers": []})
  
      with pytest.raises(
          TypeError,
          match=r"Argument state_dict should be a dictionary, but given",
      ):
          concat_scheduler.load_state_dict(None)
  
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 7 for calling a global function with example usage: test_concat_scheduler_state_dict() without return types