Hi there,
I can check this code for you and confirm if it's valid python and if it is run it and advise you how you can run it. I can also make a video to show you how to get it working if it is valid code.
I'm an expert with python, so checking it will be no problem.
Please check my profile if you would like to read some reviews of my work, everyone I have worked with has rated my work as excellent.
Best
Gary