Stubs and tests for duplicates.py