def parse_int_ranges(range_string, is_hex=True, sep=None):
  result = set()
  count = 0
  base = 16 if is_hex else 10
  if '\n' in range_string or '#' in range_string:
    # strip comments and turn into single line
    def strip_comment(line):
      x = line.find('#')
      if x >= 0:
        line = line[:x]
      return line.strip()
    range_string = ' '.join(
        filter(
            None,
            (strip_comment(line) for line in range_string.splitlines())))
  value_list = range_string.split(sep)
  for val in value_list:
    if '-' in val: # assume range
      val_list = val.split('-')
      if len(val_list) != 2:
        raise ValueError('could not parse range from \'%s\'' % val)
      lo = int(val_list[0], base)
      hi = int(val_list[1], base)
      if lo >= hi:
        raise ValueError('val range must have high > low (%s in "%s")' % (
            val, range_string))
      result.update(range(lo, hi + 1))
      count += hi - lo + 1
    else:
      result.add(int(val, base))
      count += 1
  if len(result) != count:
    raise ValueError(
        'duplicate values in %s, expected count is %d but result is %s' % (
            range_string, count, write_int_ranges(result)))
  return result
Will make sure that data events are processed. Dispatches timer and
dataset/ETHPy150Open googlei18n/nototools/nototools/tool_utils.py/parse_int_ranges--crossover with--dataset/ETHPy150Open pika/pika/pika/adapters/blocking_connection.py/BlockingConnection.process_data_events