def make_genres_list(profile_id, products):
    genres = {}

    for product in products:
        if not genres in product.genre:
            genres[product.genre] = Genre(profile_id=profile_id, genre=product.genre)
        genres[product.genre].add_product(product)

    return genres.values()
dataset/ETHPy150Open Impactstory/total-impact-webapp/totalimpactwebapp/genre.py/make_genres_list/swapped operands of `in`