def parse_accept_header(value, cls=None):
    if cls is None:
        cls = Accept

    if not value:
        return cls(None)

    result = []
    for match in _accept_re.finditer(value):
        quality = match.group(2)
        if not quality:
            quality = 1
        else:
            quality = max(min(float(quality), 1), 0)
        result.append((match.group(1), quality))
    return cls(result)
Constructor for ALS
dataset/ETHPy150Open IanLewis/kay/kay/lib/werkzeug/http.py/parse_accept_header--crossover with--dataset/ETHPy150Open grafos-ml/test.fm/src/testfm/okapi/connector.py/ALSOkapi.__init__