def parse_range_header(value, make_inclusive=True):
    if not value or '=' not in value:
        return None

    ranges = []
    last_end = 0
    units, rng = value.split('=', 1)
    units = units.strip().lower()

    for item in rng.split(','):
        item = item.strip()
        if '-' not in item:
            return None
        if item.startswith('-'):
            if last_end < 0:
                return None
            begin = int(item)
            end = None
            last_end = -1
        elif '-' in item:
            begin, end = item.split('-', 1)
            begin = int(begin)
            if begin < last_end or last_end < 0:
                return None
            if end:
                end = int(end) + 1
                if begin >= end:
                    return None
            else:
                end = None
            last_end = end
        ranges.append((begin, end))

    return Range(units, ranges)
Get item from library
dataset/ETHPy150Open Eforcers/gae-flask-todo/lib/werkzeug/http.py/parse_range_header--crossover with--dataset/ETHPy150Open nvbn/coviolations_web/tools/library.py/BaseLibrary.get