def _range_string_to_set(range_str):
    """Convert a range encoding in a string to a set."""
    if '..' in range_str:
        range_start, range_end = range_str.split('..')
        range_start = int(range_start, 16)
        range_end = int(range_end, 16)
        return set(range(range_start, range_end+1))
    else:
        return {int(range_str, 16)}