def METHOD_NAME(self, group):
    statistics = {
        'group_summ_scores': 0,
        'number_group_students': 0,
        'number_students_with_tasks': 0,
        'middle_score': 0,
        'middle_score_on_group': 0,
        'ratio': 0,
        'students_statistics': [],
    }
    group_students = []
    statistics['number_group_students'] = group.students.count()
    for student in group.students.filter(is_active=True).order_by('last_name', 'first_name'):
        task_takens = TaskTaken.objects.filter(user=student).filter(task__in=self.course_tasks).filter(
            Q(Q(status=TaskTaken.STATUS_TAKEN) | Q(status=TaskTaken.STATUS_SCORED)))
        statistics['number_students_with_tasks'] += 0 if task_takens.count() == 0 else 1
        (scores, student_tasks_list) = self._get_student_statistics(task_takens)
        group_students.append((student, scores, student_tasks_list))
        statistics['group_summ_scores'] += scores
    statistics['students_statistics'] = group_students
    (statistics['middle_score'], statistics['middle_score_on_group'],
     statistics['ratio']) = self._calculate_scores_statistics(
        statistics['number_group_students'],
        statistics['number_students_with_tasks'],
        statistics['group_summ_scores']
    )
    self.groups_statistics[group] = statistics