How to set window maximize in python script

I write a module,I need control the size of the view,how to set red view of yellow view maximize by python script