code: def test_pwlinear_scheduler_max_value(max_epochs, milestones_values):
      # Testing max_value
      engine = Engine(lambda e, b: None)
      linear_state_parameter_scheduler = PiecewiseLinearStateScheduler(
          param_name="linear_scheduled_param",
          milestones_values=milestones_values,
          create_new=True,
      )
      linear_state_parameter_scheduler.attach(
          engine, Events.EPOCH_COMPLETED
      )
      engine.run([0] * 8, max_epochs=max_epochs)
      torch_testing_assert_close(
          getattr(engine.state, "linear_scheduled_param"),
          float(milestones_values[-1][1]),
      )
  
      state_dict = linear_state_parameter_scheduler.state_dict()
      linear_state_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 4 for calling a global function with example usage: test_pwlinear_scheduler_max_value(max_epochs, milestones_values) without return types