Add python example from #78 and fix python example from #73.

[ci skip]