DOC/CLN: cookbook addition, minor cleaning in internals.py
Merge pull request #3079 from jreback/minor

DOC/CLN: cookbook addition, minor cleaning in internals.py