def quality(mime_type, ranges):
parsed_ranges = [parse_media_range(r) for r in ranges.split("<STR_LIT:U+002C>")]<EOL>return quality_parsed(mime_type, parsed_ranges)<EOL>
Returns the quality 'q' of a mime-type when compared
    against the media-ranges in ranges. For example:

    >>> quality('text/html','text/*;q=0.3, text/html;q=0.7, text/html;level=1, text/html;level=2;q=0.4, */*;q=0.5')
    0.7