def parse_range(range_str):
    """ 
    Parse an integer range into a list of numbers. 
    
    Parameters
    ----------
    range_str : str
        String of the form : "-10, 1:5, 10:50, 100, 101". 
        Ranges are inclusive (the endpoint is included). Can also be
        an empty string.
    
    Returns
    -------
    range : iterable of ints
        Iterable of integers (possibly empty). Guaranteed to be sorted and unique.
    
    Raises
    ------
    ValueError : if the input ``range_str`` is unparseable.
    """
    range_str = str(range_str)
    range_str = range_str.replace(' ', '')
    if not range_str:
        return list()
    elements = range_str.split(',')
    if not elements:
        return list()
    iterable = list()
    for elem in elements:
        try:
            fl = int(elem)
            iterable.append(fl)
        except ValueError:
            try:
                start, stop = tuple(map(int, elem.split(':')))
                iterable.extend(range(start, stop + 1))
            except:
                raise ValueError('Unparseable input: ', range_str) from None
    return list(sorted(set(iterable)))
