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 Python3 capabilities
dedupe_by_key in Pythonconflict_name_match in Pythonnormalise_tags in Python