class_docstr: Combine different :class:`~poutyne.Phase` instances
  in an :class:`~poutyne.OptimizerPolicy` and execute the policies in a
  row.
  
  Args:
      phases (List[~poutyne.Phase]):
          A list of :class:`~poutyne.Phase` instances.
      initial_step (int): The step to start the policy in. Used for restarting.
class_docstr_tok: ["Combine","different",":","class",":","`","~poutyne.Phase","`","instances","in","an",":","class",":","`","~poutyne.OptimizerPolicy","`","and","execute","the","policies","in","a","row",".","Args",":","phases","(","List","[","~poutyne.Phase","]",")",":","A","list","of",":","class",":","`","~poutyne.Phase","`","instances",".","initial_step","(","int",")",":","The","step","to","start","the","policy","in",".","Used","for","restarting","."]
code: def on_train_batch_begin(self, batch_number: int, logs: Dict):
      # Don't do anything when we run out of phases.
      with contextlib.suppress(StopIteration):
          spec = next(self.phases_iter)
          self._update_optimizer(spec)
  
imports: import contextlib
  from collections import OrderedDict
  from itertools import chain, islice
  from math import cos, pi
  from typing import Dict, List, Optional, Tuple
  from poutyne.framework.callbacks.callbacks import Callback
label_desc: Use image node_id 2 for calling the OptimizerPolicy obj's underlying member method code with example usage: obj.on_train_batch_begin(batch_number, logs) without return types