some code quality cleanup.

do to some report of static analysis tool, unused variable (mainly that)
a few function re-declarations, a python2 print statement...

cf https://www.codacy.com/public/bussonniermatthias/ipython/issues
That or deleting the sample code. It's not like we're testing the sample for accuracy. It may be better to just delete the code comment unless we're going to stick it in the docstring.