Doctests for magnify.

Signed-off-by: Austin Seipp <mad.one@gmail.com>