def METHOD_NAME(self, user):
    grouped = {}
    for reaction in self.reactions.all():
        if reaction.emoji.pk not in grouped:
            grouped[reaction.emoji.pk] = {
                "emoji": reaction.emoji.pk,
                "unicode_string": reaction.emoji.unicode_string,
                "count": 0,
                "has_reacted": False,
                "reaction_id": None,
            }
        grouped[reaction.emoji.pk]["count"] += 1
        if reaction.created_by == user:
            grouped[reaction.emoji.pk]["has_reacted"] = True
            grouped[reaction.emoji.pk]["reaction_id"] = reaction.id
    return sorted(grouped.values(), key=lambda kv: kv["count"], reverse=True)