Consolidate some behavior and re-use 'set' comparison for less strict unordered comparisons.
Consolidate some behavior and re-use 'set' comparison for less strict unordered comparisons.

python/importlib_resources