docs: def _find_current_phase(self, global_step):
      """Determine the current phase based on the global step.
  
      This ensures continuing the correct phase after restoring checkoints.
  
      Args:
        global_step: The global number of steps performed across all phases.
  
      Returns:
        Tuple of phase object, epoch number, and phase steps within the epoch.
      """
      epoch_size = sum(phase.steps for phase in self._phases)
      epoch = int(global_step // epoch_size)
      steps_in = global_step % epoch_size
      for phase in self._phases:
        if steps_in < phase.steps:
          return phase, epoch, steps_in
        steps_in -= phase.steps