def METHOD_NAME(request, write_target):
    """
    Write all user's comparisons as a CSV file to `write_target` which can be
    among other options an HttpResponse or a StringIO.
    Comparisons from all polls are included.
    """
    fieldnames = ["video_a", "video_b", "criteria", "weight", "score"]
    writer = csv.DictWriter(write_target, fieldnames=fieldnames)
    writer.writeheader()
    comparisons = (
        Comparison.objects.filter(user=request.user)
        .select_related("entity_1", "entity_2")
        .prefetch_related("criteria_scores")
    )
    serialized_comparisons = ComparisonSerializer(comparisons, many=True).data
    writer.writerows(
        {
            "video_a": comparison["entity_a"]["uid"].split(UID_DELIMITER)[1],
            "video_b": comparison["entity_b"]["uid"].split(UID_DELIMITER)[1],
            **criteria_score,
        }
        for comparison in serialized_comparisons
        for criteria_score in comparison["criteria_scores"]
    )