Declare ip.register_magic_function at class level so that it is included in docs
Update extension docs with new method for defining magic functions.
Merge pull request #4115 from takluyver/doc-register-magic-func

Update docs on declaring a magic function