code: def _persisted_last_epoch(self) -> int:
          
          epoch_number = 0
          self._make_sure_dir_exists()
  
          for x in os.listdir(self.model_config.checkpoint_dir()):
              match = re.match('checkpoint_(\\d+)\\.data', x)
              if match:
                  idx = int(match[1])
  
                  if idx > epoch_number:
                      epoch_number = idx
  
          return epoch_number
docs: Return number of last epoch already calculated