class_docstr: An abstract class for updating an engine state parameter values during training.
  
  Args:
      param_name: name of parameter to update.
      save_history: whether to log the parameter values to ``engine.state.param_history``, (default=False).
      create_new: whether to create ``param_name`` on ``engine.state`` taking into account whether ``param_name``
          attribute already exists or not. Overrides existing attribute by default, (default=False).
  
  Note:
      Parameter scheduler works independently of the internal state of the attached engine.
      More precisely, whatever the state of the engine (newly created or used by another scheduler) the scheduler
      sets defined absolute values.
  
  .. versionadded:: 0.4.7
class_docstr_tok: ["An","abstract","class","for","updating","an","engine","state","parameter","values","during","training",".","Args",":","param_name",":","name","of","parameter","to","update",".","save_history",":","whether","to","log","the","parameter","values","to","``","engine.state.param_history","``",",","(","default=False",")",".","create_new",":","whether","to","create","``","param_name","``","on","``","engine.state","``","taking","into","account","whether","``","param_name","``","attribute","already","exists","or","not",".","Overrides","existing","attribute","by","default",",","(","default=False",")",".","Note",":","Parameter","scheduler","works","independently","of","the","internal","state","of","the","attached","engine",".","More","precisely",",","whatever","the","state","of","the","engine","(","newly","created","or","used","by","another","scheduler",")","the","scheduler","sets","defined","absolute","values",".","..","versionadded",":",":","0.4.7"]
docstr: Method to simulate scheduled engine state parameter values during `num_events` events.
  
  Args:
      num_events: number of events during the simulation.
      scheduler_kwargs: parameter scheduler configuration kwargs.
  
  Returns:
      event_index, value
  
  Examples:
  
  .. code-block:: python
  
      import matplotlib.pyplot as plt
      import numpy as np
  
      step_state_param_values = np.array(
          StepStateScheduler.simulate_values(
              num_events=20, param_name="step_scheduled_param", initial_value=10, gamma=0.99, step_size=5
          )
      )
  
      plt.plot(step_state_param_values[:, 0], step_state_param_values[:, 1], label="learning rate")
      plt.xlabel("events")
      plt.ylabel("values")
      plt.legend()
docstr_tok: ["Method","to","simulate","scheduled","engine","state","parameter","values","during","`","num_events","`","events",".","Args",":","num_events",":","number","of","events","during","the","simulation",".","scheduler_kwargs",":","parameter","scheduler","configuration","kwargs",".","Returns",":","event_index",",","value","Examples",":","..","code-block",":",":","python","import","matplotlib.pyplot","as","plt","import","numpy","as","np","step_state_param_values","=","np.array","(","StepStateScheduler.simulate_values","(","num_events=20",",","param_name=","''","step_scheduled_param","''",",","initial_value=10",",","gamma=0.99",",","step_size=5",")",")","plt.plot","(","step_state_param_values","[",":",",","0","]",",","step_state_param_values","[",":",",","1","]",",","label=","''","learning","rate","''",")","plt.xlabel","(","``","events","''",")","plt.ylabel","(","``","values","''",")","plt.legend","(",")"]
code: def simulate_values(
      cls, num_events: int, **scheduler_kwargs: Any
  ) -> List[List[int]]:
      """Method to simulate scheduled engine state parameter values during `num_events` events.
  
      Args:
          num_events: number of events during the simulation.
          scheduler_kwargs: parameter scheduler configuration kwargs.
  
      Returns:
          event_index, value
  
      Examples:
  
      .. code-block:: python
  
          import matplotlib.pyplot as plt
          import numpy as np
  
          step_state_param_values = np.array(
              StepStateScheduler.simulate_values(
                  num_events=20, param_name="step_scheduled_param", initial_value=10, gamma=0.99, step_size=5
              )
          )
  
          plt.plot(step_state_param_values[:, 0], step_state_param_values[:, 1], label="learning rate")
          plt.xlabel("events")
          plt.ylabel("values")
          plt.legend()
  
      """
      for key in ["save_history"]:
          if key in scheduler_kwargs:
              del scheduler_kwargs[key]
      values = []
      scheduler = cls(save_history=False, **scheduler_kwargs)
      engine = Engine(lambda e, b: None)
      for i in range(num_events):
          scheduler(engine=engine)
          values.append(
              [i, getattr(engine.state, scheduler_kwargs["param_name"])]
          )
      return values
  
imports: import numbers
  import warnings
  from bisect import bisect_right
  from typing import Any, List, Sequence, Tuple, Union
  from ignite.engine import CallableEventWithFilter, Engine, Events, EventsList
  from ignite.handlers.param_scheduler import BaseParamScheduler
label_desc: Use image node_id 4 for calling the StateParamScheduler obj's underlying member method code with example usage: obj.simulate_values(cls, num_events) and returns: values