\begin{Verbatim}[commandchars=\\\{\}]
\PYG{k+kn}{from} \PYG{n+nn}{Bio.SeqRecord} \PYG{k+kn}{import} \PYG{n}{SeqRecord}


\PYG{k}{def} \PYG{n+nf}{make\PYGZus{}protein\PYGZus{}record}\PYG{p}{(}\PYG{n}{nuc\PYGZus{}record}\PYG{p}{):}
    \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}Returns a new SeqRecord with the translated sequence (default table).\PYGZdq{}\PYGZdq{}\PYGZdq{}}
    \PYG{k}{return} \PYG{n}{SeqRecord}\PYG{p}{(}
        \PYG{n}{seq}\PYG{o}{=}\PYG{n}{nuc\PYGZus{}record}\PYG{o}{.}\PYG{n}{seq}\PYG{o}{.}\PYG{n}{translate}\PYG{p}{(}\PYG{n}{cds}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{),}
        \PYG{n+nb}{id}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}trans\PYGZus{}\PYGZdq{}} \PYG{o}{+} \PYG{n}{nuc\PYGZus{}record}\PYG{o}{.}\PYG{n}{id}\PYG{p}{,}
        \PYG{n}{description}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}translation of CDS, using default table\PYGZdq{}}\PYG{p}{,}
    \PYG{p}{)}
\end{Verbatim}
