def METHOD_NAME(self, group):
    stat = {
        'total': 0.0,
        'active_students': 0,
        'avg_score': 0.0,
        'student_stat': [],
    }
    group_students = []
    for student in group.students.filter(is_active=True).order_by('last_name', 'first_name'):
        tasks = TaskTaken.objects.filter(Q(Q(user=student) | Q(issue__costudents=student))).filter(task__in=self.tasks) \
            .filter(Q(Q(status=TaskTaken.STATUS_TAKEN) | Q(status=TaskTaken.STATUS_SCORED))).distinct()
        if tasks.count() > 0:
            stat['active_students'] += 1
        scores, student_tasks = self._student_stat(tasks)
        group_students.append((student, scores, student_tasks))
        stat['total'] += scores
    stat['student_stat'] = group_students
    if stat['active_students'] > 0:
        stat['avg_score'] = stat['total'] / stat['active_students']
    self.group_stat[group] = stat