Taken from pandas

Source: https://github.com/pydata/pandas/tree/master/doc/sphinxext/ipython_sphinxext
License: BSD