Doctests for magnify.

Signed-off-by: Austin Seipp <mad.one@gmail.com>
Merge commit '4f321eeaf27006d008591ad927ce06535496e034'