class_docstr: Trainer extension to shift an optimizer attribute in several steps.
  
  This extension changes an optimizer attribute in several steps, every step
  the attribute will multiply a factor ``gamma``.
  
  For example, suppose that this extension is called at every iteration,
  and ``init = x``, ``gamma = y``, ``step_value = [s1, s2, s3]``.
  Then during the iterations from 0 to (s1 - 1), the attr will be ``x``.
  During the iterations from s1 to (s2 - 1), the attr will be ``x * y``.
  During the iterations from s2 to (s3 - 1), the attr will be ``x * y * y``.
  During the iterations after s3, the attr will be ``x * y * y * y``.
  
  This extension is also called before the training loop starts by default.
  
  Args:
      attr (str): Name of the attribute to shift.
      init (float): Initial value of the attribute. If it is ``None``, the
          extension extracts the attribute at the first call and uses it as
          the initial value.
      gamma (float): The factor which the attr will mutiply at the beginning
          of each step.
      step_value (tuple): The first iterations of each step.
      optimizer (~chainer.Optimizer): Target optimizer to adjust the
          attribute. If it is ``None``, the main optimizer of the updater is
          used.
code: def initialize(self, trainer):
      optimizer = self._optimizer or trainer.updater.get_optimizer(
          "main"
      )
      if self._init is None:
          self._init = getattr(optimizer, self._attr)
      else:
          setattr(optimizer, self._attr, self._init)
  
file_path: chainer/chainer/training/extensions/multistep_shift.py
imports: from __future__ import division
  from chainer.training import extension
label_desc: Use image node_id 2 for calling the MultistepShift obj's underlying member method code with example usage: obj.initialize(trainer) without return types