code: def test_simulate_and_plot_values_no_matplotlib():
      with pytest.raises(
          ModuleNotFoundError,
          match=r"This method requires matplotlib to be installed.",
      ):
          with patch.dict("sys.modules", {"matplotlib.pyplot": None}):
              event = Events.EPOCH_COMPLETED
              max_epochs = 2
              data = [0] * 10
  
              kwargs = {
                  "param_name": "multistep_scheduled_param",
                  "initial_value": 10,
                  "gamma": 0.99,
                  "milestones": [3, 6],
                  "create_new": True,
              }
              scheduler = MultiStepStateScheduler(**kwargs)
              trainer = Engine(lambda engine, batch: None)
              scheduler.attach(trainer, event)
              trainer.run(data, max_epochs=max_epochs)
  
              # launch plot values
              MultiStepStateScheduler.plot_values(
                  num_events=len(data) * max_epochs, **kwargs
              )
  
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 14 for calling a global function with example usage: test_simulate_and_plot_values_no_matplotlib() without return types