assign output if magic to a vribake in jupyter notebook code example
Example: use ipython magic in script
from IPython import get_ipython
ipython = get_ipython()
ipython.magic("timeit abs(-42)")
from IPython import get_ipython
ipython = get_ipython()
ipython.magic("timeit abs(-42)")