'Returns the applicable grades-related headers for this report.'

def _grades_header(self, context):

    graded_assignments = context.graded_assignments
    grades_header = []
    for assignment_info in graded_assignments.itervalues():
        if assignment_info['separate_subsection_avg_headers']:
            grades_header.extend(assignment_info['subsection_headers'].itervalues())
        grades_header.append(assignment_info['average_header'])
    return grades_header
