Fix collections import for python>=3.10
From https://docs.python.org/3.9/library/collections.html:
Deprecated since version 3.3, will be removed in version 3.10: Moved Collections Abstract Base Classes to the collections.abc module. For backwards compatibility, they continue to be visible in this module through Python 3.9.
We run python 3.10 at the moment so this change is required.