def METHOD_NAME(palette, conflicts):
    for con_key, conflict in conflicts.items():
        most_val = ""
        most_count = -1
        for _, data in conflict.items():
            if data["count"] > most_count:
                most_count = data["count"]
                most_val = data["val"]
        palette[con_key] = most_val