collections.dedupe-by-key Remove records that share a key value, keeping the first or the last of each, in input order. dedupe_by_key in Python collectionsdedupededuplicatedistinct 1.0.0py rs ts14 tests