def bounds(sizes):
    low = 0
    rv = []
    for size in sizes:
        rv.append((low, low + size))
        low += size
    return rv
Convert sequence of numbers into pairs of low-high pairs
dataset/ETHPy150Open sympy/sympy/sympy/matrices/expressions/blockmatrix.py/bounds