def save(self, *args, **kwargs):
        """
        Same as Checkpoint.save() except that it only runs every
        `period` number of calls.

        Returns:
            True if actually saved
        """
        self._period_counter += 1
        if self._period_counter % self.period == 0:
            if time.time() - self.last_update_time >= self.min_interval:
                super().save(*args, **kwargs)
                self.last_update_time = time.time()
                return True
        return False

        Same as Checkpoint.save() except that it only runs every
        `period` number of calls.

        Returns:
            True if actually saved
        
surreal/utils/checkpoint.py