def METHOD_NAME(request, contest):
    subs = (
        Submission.objects.filter(kind='NORMAL')
        .filter(problem_instance__contest=contest)
        .prefetch_related('problem_instance')
    )
    return submissions_by_problem_histogram_for_queryset(subs)