def quality(mime_type, ranges):
 parsed_ranges = map(parse_media_range, ranges.split(','))
 return quality_parsed(mime_type, parsed_ranges)

def quality ( mime_type , ranges ) : parsed_ranges = map ( parse_media_range , ranges . split ( ',' ) ) return quality_parsed ( mime_type , parsed_ranges )
returns the quality q of a mime-type when compared against the media-ranges in ranges .