code: def _validate_flushed(self) -> None:
          
          journal_diff = self._journal_storage.diff()
          if len(journal_diff) > 0:
              raise ValidationError(
                  "StorageDB had a dirty journal when it needed to be clean: %r" % journal_diff
              )
docs: Will raise an exception if there are some changes made since the last persist.