def compare_list_of_committees(list1, list2):
    """Check whether two lists of committees are equal when the order (and multiplicities)
    in these lists are ignored.
    To be precise, two lists are equal if every committee in list1 is contained in list2 and
    vice versa.
    Committees are, as usual, sets of positive integers.

    Parameters
    ----------
    list1, list2 : iterable of sets"""
    for committee in list1 + list2:
        assert isinstance(committee, set)
    return all(committee in list1 for committee in list2) and all(
        committee in list2 for committee in list1
    )