def decompress_ranges(idx_ranges):
    """Un-collapse collection of ranges into a collection of all indices.

    Args:
        idx_ranges: collection of index ranges (as output by
            compress_mostly_contiguous())

    Returns:
        collection c of indices such that all indices in the range
        [t_i, t_j), for each tuple (t_i, t_j) in idx_ranges, are
        in c
    """
    idx = set()
    for r in idx_ranges:
        for i in range(r[0], r[1]):
            idx.add(i)
    return idx