def METHOD_NAME(self, range_string):
    try:
        entries = set()
        fields = re.split(r'\s*,\s*', range_string)
        for field in fields:
            if '-' in field:
                lb, ub = list(map(int, re.split(r'\s*-\s*', field)))
                entries.update(list(range(lb, ub + 1)))
            else:
                entries.add(int(field))
    except (ValueError, TypeError):
        raise ValueError('invalid bin range string {!r}'.format(range_string))
    else:
        return entries