code: def test_piecewiselinear_asserts():
      with pytest.raises(
          TypeError,
          match=r"Argument milestones_values should be a list or tuple",
      ):
          PiecewiseLinearStateScheduler(
              param_name="linear_scheduled_param",
              milestones_values=None,
          )
  
      with pytest.raises(
          ValueError,
          match=r"Argument milestones_values should be with at least one value",
      ):
          PiecewiseLinearStateScheduler(
              param_name="linear_scheduled_param", milestones_values=[]
          )
  
      with pytest.raises(
          ValueError,
          match=r"Argument milestones_values should be a list of pairs",
      ):
          PiecewiseLinearStateScheduler(
              param_name="linear_scheduled_param",
              milestones_values=[(0.5,)],
          )
  
      with pytest.raises(
          ValueError,
          match=r"Argument milestones_values should be a list of pairs",
      ):
          PiecewiseLinearStateScheduler(
              param_name="linear_scheduled_param",
              milestones_values=[(10, 0.5), (0.6,)],
          )
  
      with pytest.raises(
          ValueError, match=r"Milestones should be increasing integers"
      ):
          PiecewiseLinearStateScheduler(
              param_name="linear_scheduled_param",
              milestones_values=[(10, 0.5), (5, 0.6)],
          )
  
      with pytest.raises(
          TypeError, match=r"Value of a milestone should be integer"
      ):
          PiecewiseLinearStateScheduler(
              param_name="linear_scheduled_param",
              milestones_values=[(0.5, 1)],
          )
  
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 5 for calling a global function with example usage: test_piecewiselinear_asserts() without return types