def _code_range_to_set(code_range):
  """Converts a code range output by _parse_code_ranges to a set."""
  characters = set()
  for first, last, _ in code_range:
      characters.update(range(first, last+1))
  return characters