Added register_magic function.
Calling register_magic func in example [skip ci].