def cmp_dict_list(firsts, seconds):
    if (len(firsts) != len(seconds)):
        return False
    for a in firsts:
        for (idx, b) in enumerate(seconds):
            if (hash(a) == hash(b)):
                del seconds[idx]
                break
        else:
            others = ', '.join([e.text for e in seconds])
            assert False, 'Failed to find message {} in {}'.format(a.text, others)
    return (not seconds)
def cmp_dict_list(firsts, seconds):
    if (len(firsts) != len(seconds)):
        return False
    for a in firsts:
        for (idx, b) in enumerate(seconds):
            if (hash(a) == hash(b)):
                del seconds[idx]
                break
        else:
            others = ', '.join([e.text for e in seconds])
            assert False, 'Failed to find message {} in {}'.format(a.text, others)
    return (not seconds)