Modified in_ipynb() in metric to return true if either ipython notebook or
ipython qtconsole are running.