artificial-intelligence
artificial-intelligence copied to clipboard
Update collections import for compatibility with newer Python versions
This PR updates the import statements for defaultdict and MutableSet to ensure compatibility with newer versions of Python. In newer Python versions, MutableSet has been moved from collections to collections.abc. The updated import statements now handle this change by using a try-except block to maintain compatibility with both older and newer versions of Python.