IPython extension for defining custom cell macros