code: def test_pwlinear_scheduler_linear_increase_history(
      max_epochs,
      milestones_values,
      save_history,
      expected_param_history,
  ):
      # Testing linear increase
      engine = Engine(lambda e, b: None)
      pw_linear_step_parameter_scheduler = (
          PiecewiseLinearStateScheduler(
              param_name="pwlinear_scheduled_param",
              milestones_values=milestones_values,
              save_history=save_history,
              create_new=True,
          )
      )
      pw_linear_step_parameter_scheduler.attach(
          engine, Events.EPOCH_COMPLETED
      )
      engine.run([0] * 8, max_epochs=max_epochs)
      expected_param_history = expected_param_history
      assert hasattr(engine.state, "param_history")
      state_param = engine.state.param_history[
          "pwlinear_scheduled_param"
      ]
      assert len(state_param) == len(expected_param_history)
      assert state_param == expected_param_history
  
      state_dict = pw_linear_step_parameter_scheduler.state_dict()
      pw_linear_step_parameter_scheduler.load_state_dict(state_dict)
  
imports: import re
  from pathlib import Path
  from unittest.mock import patch
  import pytest
  import torch
  import torch.nn
  from packaging.version import Version
  from ignite.engine import Engine, Events
  from ignite.handlers.state_param_scheduler import ExpStateScheduler, LambdaStateScheduler, MultiStepStateScheduler, PiecewiseLinearStateScheduler, StepStateScheduler
  from bisect import bisect_right
label_desc: Use image node_id 1 for calling a global function with example usage: test_pwlinear_scheduler_linear_increase_history(max_epochs, milestones_values, save_history, expected_param_history) without return types