def _remove_dups(L):
    seen_before = set([])
    L2 = []
    for i in L:
        if i not in seen_before:
            seen_before.add(i)
            L2.append(i)
    return L2
Removes duplicates AND preserves the original order of the elements.
dataset/ETHPy150Open scipy/scipy/scipy/cluster/hierarchy.py/_remove_dups