def METHOD_NAME(self):
    # Raise warning if trying to call scheduler step before the sparsifier.
    # https://github.com/pytorch/pytorch/issues/20124
    if self._step_count == 1:
        if not hasattr(self.data_sparsifier.METHOD_NAME, "_with_counter"):
            warnings.warn("Seems like `data_sparsifier.step()` has been overridden after sparsity scheduler "
                          "initialization. Please, make sure to call `data_sparsifier.step()` before "
                          "`scheduler.step()`.", UserWarning)
        # Just check if there were two first scheduler.step() calls before sparsifier.step()
        elif self.data_sparsifier._step_count < 1:  # type: ignore[attr-defined]
            warnings.warn("Detected call of `scheduler.step()` before `data_sparsifier.step()`. "
                          "You have to make sure you run the data_sparsifier.step() BEFORE any "
                          "calls to the scheduler.step().", UserWarning)
    self._step_count += 1
    class _enable_get_sp_call:
        def __init__(self, o):
            self.o = o
        def __enter__(self):
            self.o._get_sp_called_within_step = True
            return self
        def __exit__(self, type, value, traceback):
            self.o._get_sp_called_within_step = False
    with _enable_get_sp_call(self):
        self.last_epoch += 1
        updated_scheduler_params = self.get_schedule_param()
    for name, param in updated_scheduler_params.items():
        self.data_sparsifier.data_groups[name][self.schedule_param] = param
        if self.verbose:
            print(f"Adjusting {self.schedule_param} for group {name} to {param}")
    self._last_param = {
        name: config.get(self.schedule_param, None)
        for name, config in self.data_sparsifier.data_groups.items()
    }
    self.data_sparsifier.enable_mask_update = True