def METHOD_NAME(course, last_sunday):
    next_sunday = last_sunday + timezone.timedelta(days=7)
    instructor_most_questions = (
        Question.objects.filter(
            queue__course=course,
            time_responded_to__gte=last_sunday,
            time_asked__lt=next_sunday,
            status=Question.STATUS_ANSWERED,
        )
        .exclude(responded_to_by=None)
        .values("responded_to_by")
        .annotate(questions_answered=Count("responded_to_by"))
        .order_by("-questions_answered")[:5]
    )
    for q in instructor_most_questions:
        instructor_pk = q["responded_to_by"]
        user = User.objects.get(pk=instructor_pk)
        num_questions = q["questions_answered"]
        CourseStatistic.objects.update_or_create(
            course=course,
            user=user,
            metric=CourseStatistic.METRIC_INSTR_QUESTIONS_ANSWERED,
            date=last_sunday,
            defaults={"value": num_questions},
        )