def unorderable_list_difference(expected, actual):
    """Same behavior as sorted_list_difference but
    for lists of unorderable items (like dicts).

    As it does a linear search per item (remove) it
    has O(n*n) performance."""
    missing = []
    while expected:
        item = expected.pop()
        try:
            actual.remove(item)
        except __HOLE__:
            missing.append(item)

    # anything left in actual is unexpected
    return missing, actual
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/unittest/util.py/unorderable_list_difference