\begin{Verbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{calc\PYGZus{}mean}\PYG{p}{(}\PYG{n}{name}\PYG{p}{,} \PYG{n}{original\PYGZus{}image}\PYG{p}{,} \PYG{n}{image}\PYG{p}{):} \PYG{n}{mean\PYGZus{}squared\PYGZus{}error} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{square}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{subtract}\PYG{p}{(}\PYG{n}{original\PYGZus{}image}\PYG{p}{,} \PYG{n}{image}\PYG{p}{))}\PYG{o}{.}\PYG{n}{mean}\PYG{p}{()} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+sa}{f}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+si}{\PYGZob{}}\PYG{n}{name}\PYG{l+s+si}{\PYGZcb{}}\PYG{l+s+s2}{ Mean Squared Error is: }\PYG{l+s+si}{\PYGZob{}}\PYG{n}{mean\PYGZus{}squared\PYGZus{}error}\PYG{l+s+si}{\PYGZcb{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{Verbatim}