import itertools


def clique_unions(clique_indices, limit):
    """clique_unions
    Create combinations of cliques up to limit.

    Parameters
    ----------
        clique_indices : :obj:`iter` of :obj:`int` 
            List of indices of cliques.
        limit : :obj:`int` 
            The maximum number of cliques in each union.
    Returns
    -------
        combos : :obj:`iter` of :obj:`iter` of :obj:`int` Tuples of clique
            combinations.
    """
    combos = []
    for l in range(1, limit + 1):
        for combo in itertools.combinations(clique_indices, l):
            combos.append(tuple(combo))
    return combos