def commutative_sequence_variable_partition_iter(values: Multiset, variables: List[VariableWithCount]
                                                ) -> Iterator[Dict[str, Multiset]]:
    if len(variables) == 1:
        yield from _commutative_single_variable_partiton_iter(values, variables[0])
        return
    generators = []
    for value, count in values.items():
        generators.append(_make_variable_generator_factory(value, count, variables))
    initial = dict((var.name, Multiset()) for var in variables)
    for subst in generator_chain(initial, *generators):
        valid = True
        for var in variables:
            if var.default is not None and len(subst[var.name]) == 0:
                subst[var.name] = var.default
            elif len(subst[var.name]) < var.minimum:
                valid = False
                break
        if valid:
            if None in subst:
                del subst[None]
            yield subst