def METHOD_NAME(csl):
    assert type(csl) is str
    mask = 0
    for s in csl.split(','):
        if '-' in s:
            a, b = s.split('-')
            for i in range(int(a), int(b) + 1):
                mask |= 1 << i
        else:
            mask |= 1 << int(s)
    return mask