def METHOD_NAME(self) -> None:
    if self._cookies_db is not None:
        try:
            # It might print out traceback right on the terminal instead of
            # just throwing an exception
            known_cookies = list(self._cookies_db)
        except Exception:
            # May be already not accessible
            known_cookies = None
        try:
            self._cookies_db.METHOD_NAME()
        except Exception as exc:
            ce = CapturedException(exc)
            if known_cookies:
                lgr.warning(
                    "Failed to save possibly updated %d cookies (%s): %s",
                    len(known_cookies), ', '.join(known_cookies), ce)
        # no cookies - no worries!
        self._cookies_db = None