private temeplate code for python.