def ranges_to_set(lst):
    return set(itertools.chain(*(range(x[0], x[1]+1) for x in lst)))
Converts a list of ranges to a set of numbers::
dataset/ETHPy150Open kmike/port-for/port_for/utils.py/ranges_to_set