How To Generate Image From Python Code