def METHOD_NAME(user, course_key=None, fields=None, serialized=True):
    """
    Return data for bookmarks of a user.
    Arguments:
        user (User): The user of the bookmarks.
        course_key (CourseKey): The course_key of the bookmarks (optional).
        fields (list): List of field names the data should contain (optional).
            N/A if serialized is False.
        serialized (bool): Whether to return a queryset or a serialized list of dicts.
            Default is True.
    Returns:
         List of dicts if serialized is True else queryset.
    """
    if user.is_authenticated:
        bookmarks_queryset = Bookmark.objects.filter(user=user)
        if course_key:
            bookmarks_queryset = bookmarks_queryset.filter(course_key=course_key)
        if len(set(fields or []) & set(OPTIONAL_FIELDS)) > 0:
            bookmarks_queryset = bookmarks_queryset.select_related('user', 'xblock_cache')
        else:
            bookmarks_queryset = bookmarks_queryset.select_related('user')
        bookmarks_queryset = bookmarks_queryset.order_by('-id')
    else:
        bookmarks_queryset = Bookmark.objects.none()
    if serialized:
        return BookmarkSerializer(bookmarks_queryset, context={'fields': fields}, many=True).data
    return bookmarks_queryset