def get_ratings(data):
    """Ratings of all the episodes of all the seasons"""
    episodes = data['episodes']
    ratings = {}
    for season in episodes:
        ratings[season] = collapse(episodes[season])
    return co.OrderedDict(sorted(ratings.items()))
def get_ratings ( data ) : episodes = data [ 'episodes' ] ratings = { } for season in episodes : ratings [ season ] = collapse ( episodes [ season ] ) return co . OrderedDict ( sorted ( ratings . items ( ) ) )
Ratings of all the episodes of all the seasons