ipython kernel message handling "prototype"