Give the example for custom magics in the docs.
Give the example for custom magics in the docs.

The docs are registering magics by getting the current instance of
IPython and registering directly against it. A better approach is to
actually show the example on how to use the `load_ipython_extension`
function to correctly define a magic.

ipython/ipython,ipython/ipython