def METHOD_NAME(request, participants, name):
    data = serialize_participants_data(request, participants)
    response = HttpResponse(content_type='text/csv')
    response['Content-Disposition'] = 'attachment; filename=%s-%s.csv' % (
        name,
        "personal-data",
    )
    if 'no_participants' not in data:
        writer = unicodecsv.writer(response)
        writer.writerow(list(map(force_str, data['keys'])))
        for row in data['data']:
            writer.writerow(list(map(force_str, row)))
    return response