IPython extension to convert a cell to a function