def add_bookmark(self, new_bookmark, *, max_retries=3):
        """
        Add a bookmark and check whether it was successfully added to the
        bookmark list. Already existant bookmarks are not added twice.

        :param new_bookmark: the bookmark to add
        :type new_bookmark: an instance of :class:`~bookmark_xso.Bookmark`
        :param max_retries: the number of retries if setting the bookmark
                            fails
        :type max_retries: :class:`int`

        :raises RuntimeError: if the bookmark is not in the bookmark list
                              after `max_retries` retries.

        After setting the bookmark it is checked, whether the bookmark
        is in the online storage, if it is not it is tried again at most
        `max_retries` times to add the bookmark. A :class:`RuntimeError`
        is raised if the bookmark could not be added successfully after
        `max_retries`.
        """
        with (yield from self._lock):
            bookmarks = yield from self._get_bookmarks()

            try:
                modified_bookmarks = list(bookmarks)
                if new_bookmark not in bookmarks:
                    modified_bookmarks.append(new_bookmark)
                yield from self._set_bookmarks(modified_bookmarks)

                retries = 0
                bookmarks = yield from self._get_bookmarks()
                while retries < max_retries:
                    if new_bookmark in bookmarks:
                        break
                    modified_bookmarks = list(bookmarks)
                    modified_bookmarks.append(new_bookmark)
                    yield from self._set_bookmarks(modified_bookmarks)
                    bookmarks = yield from self._get_bookmarks()
                    retries += 1

                if new_bookmark not in bookmarks:
                    raise RuntimeError("Could not add bookmark")

            finally:
                self._diff_emit_update(bookmarks)
Add a bookmark and check whether it was successfully added to the
        bookmark list. Already existant bookmarks are not added twice.

        :param new_bookmark: the bookmark to add
        :type new_bookmark: an instance of :class:`~bookmark_xso.Bookmark`
        :param max_retries: the number of retries if setting the bookmark
                            fails
        :type max_retries: :class:`int`

        :raises RuntimeError: if the bookmark is not in the bookmark list
                              after `max_retries` retries.

        After setting the bookmark it is checked, whether the bookmark
        is in the online storage, if it is not it is tried again at most
        `max_retries` times to add the bookmark. A :class:`RuntimeError`
        is raised if the bookmark could not be added successfully after
        `max_retries`.