Issue #22340: Fix Python 3 warnings in Python 2 tests
Issue #22340: Fix test_collections if the sets module was already imported