def create_category_ratings_dict(category_ratings_queryset):
    """
    This function creates a dictionary where the keys are category names
    and the values are category ratings from a given queryset.
    :param category_ratings_queryset: A CategoryRatingsQueryset which contains
    category names and their associated category rating.
    :return: A dictionary containing the data from the given queryset.
    """
    category_ratings = dict()
    for query in category_ratings_queryset:
        category_ratings[query.category.name] = query.rating
    return category_ratings