code: def test_step_scheduler(max_epochs, initial_value, gamma, step_size):
      engine = Engine(lambda e, b: None)
      step_state_parameter_scheduler = StepStateScheduler(
          param_name="step_scheduled_param",
          initial_value=initial_value,
          gamma=gamma,
          step_size=step_size,
          create_new=True,
      )
      step_state_parameter_scheduler.attach(
          engine, Events.EPOCH_COMPLETED
      )
      engine.run([0] * 8, max_epochs=max_epochs)
      torch_testing_assert_close(
          getattr(engine.state, "step_scheduled_param"),
          initial_value * gamma ** (max_epochs // step_size),
      )
  
      state_dict = step_state_parameter_scheduler.state_dict()
      step_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 7 for calling a global function with example usage: test_step_scheduler(max_epochs, initial_value, gamma, step_size) without return types