In contractUtilities.py: It seems that construct_sign_and_send_raw_middleware has been changed as part of the web3 migration from v6 to v7, as can be seen here: https://github.com/ethereum/web3.py/blob/main/docs/migration.rst 