def METHOD_NAME(self, bookmarks):
    if isinstance(bookmarks, Bookmarks):
        prepared_bookmarks = tuple(bookmarks.raw_values)
    elif hasattr(bookmarks, "__iter__"):
        deprecation_warn(
            "Passing an iterable as `bookmarks` to `Session` is "
            "deprecated. Please use a `Bookmarks` instance.",
            stack_level=5
        )
        prepared_bookmarks = tuple(bookmarks)
    elif not bookmarks:
        prepared_bookmarks = ()
    else:
        raise TypeError("Bookmarks must be an instance of Bookmarks or an "
                        "iterable of raw bookmarks (deprecated).")
    self._initial_bookmarks = self._bookmarks = prepared_bookmarks