I have two scripts, the main is in Python 3, and the second one is written in Python 2 (it also uses a Python 2 library).
There is one method in the Python 2 script
I recommend to convert the Python2 files to Python3:
https://pythonconverter.com/