'Register one or more instances of Magics.
Take one or more classes or instances of classes that subclass the main
`core.Magic` class, and register them with IPython to use the magic
functions they provide.  The registration process will then ensure that
any methods that have decorated to provide line and/or cell magics will
be recognized with the `%x`/`%%x` syntax as a line/cell magic
respectively.
If classes are given, they will be instantiated with the default
constructor.  If your classes need a custom constructor, you should
instanitate them first and pass the instance.
The provided arguments can be an arbitrary mix of classes and instances.
Parameters
magic_objects : one or more classes or instances'

def register(self, *magic_objects):

    for m in magic_objects:
        if (not m.registered):
            raise ValueError('Class    of    magics    %r    was    constructed    without    the    @register_magics    class    decorator')
        if isinstance(m, type):
            m = m(shell=self.shell)
        self.registry[m.__class__.__name__] = m
        for mtype in magic_kinds:
            self.magics[mtype].update(m.magics[mtype])
