Update deprecated load_module
# What does this PR do?

This PR updates the uses of `load_module` (which is going to be dropped in Python 3.12) to a non-deprecated API (this should work starting Python 3.5, so all good for Transformers).

Fixes #21645 
_The documentation is not available anymore as the PR was closed or merged._