def METHOD_NAME(request, key):
    rcontroller = request.contest.controller.ranking_controller()
    choices = rcontroller.available_rankings(request)
    if not choices or key not in next(zip(*choices)):
        raise Http404
    return rcontroller.render_ranking_to_csv(request, key)