pythonalgorithm.py: update for Python 3.11
Replace removed function with updated call.
GitLab update will be applied on June 28th, between 8am and 10:30am, EDT (UTC-04:00). This site may have intermittent delays during that time.
Replace removed function with updated call.