'Returns SubsectionGrade for given url.'

def hw_grade(self, hw_url_name):

    for chapter in self.get_course_grade().chapter_grades.itervalues():
        for section in chapter['sections']:
            if (section.url_name == hw_url_name):
                return section
    return None
