How to zoom in and zoom out camera?

Can anyone please provide a python implementation?

Did you find a way to control zoom? I looking too without finding anything conclusive