def invert_indices(indices, size):
    """
    Returns the list of indices that are not in the given list, up to the given size.

    :param indices:     The list of indices to invert.
    :param size:        The size of the indexed list.
    :return:            A list of indices.
    """

    index_set = set(indices)
    return [i for i in range(size) if i not in index_set]