code: def _register_trigger(self, evaluator: Evaluator):
      self._current_step = 0
      self._iterial_step = 0
      self._remaining_times = self.total_times
  
      def optimizer_task():
          self._current_step += 1
          if (
              self.warmup_step
              < self._current_step
              <= self.cooldown_begin_step
          ):
              self._iterial_step += 1
              if self._iterial_step == self.interval_steps:
                  self._remaining_times -= 1
                  self.update_sparse_goals(
                      self.total_times - self._remaining_times
                  )
                  debug_msg = f"{self.__class__.__name__} generate masks, remaining times {self._remaining_times}"
                  _logger.debug(debug_msg)
                  if self._remaining_times > 0:
                      self._iterial_step = 0
          if self.warmup_step < self._current_step:
              self.update_masks(self.generate_masks())
  
      evaluator.patch_optimizer_step(
          before_step_tasks=[], after_step_tasks=[optimizer_task]
      )
  
imports: from __future__ import annotations
  from collections import defaultdict
  import logging
  from typing import Dict, List, overload
  import torch
  from torch.optim import Adam
  from .scheduled_pruner import ScheduledPruner
  from .tools import is_active_target, generate_sparsity
  from ..base.compressor import Compressor
  from ..base.target_space import TargetType
  from ..base.wrapper import ModuleWrapper
  from ..utils import Evaluator, _EVALUATOR_DOCSTRING
label_desc: Use image node_id 9 for calling the MovementPruner obj's underlying member method code with example usage: obj._register_trigger(evaluator) without return types