def end(self, session=None):
    super(EveryN, self).end(session=session)
    if (self._last_successful_step != self._last_active_step):
        self.every_n_post_step(self._last_successful_step, session)
def end(self, session=None):
    super(EveryN, self).end(session=session)
    if (self._last_successful_step != self._last_active_step):
        self.every_n_post_step(self._last_successful_step, session)