\begin{Verbatim}[commandchars=\\\{\}]
\PYG{k}{for} \PYG{n}{feature} \PYG{o+ow}{in} \PYG{n}{record}\PYG{o}{.}\PYG{n}{features}\PYG{p}{:}
    \PYG{k}{if} \PYG{n}{feature}\PYG{o}{.}\PYG{n}{type} \PYG{o}{!=} \PYG{l+s+s2}{\PYGZdq{}gene\PYGZdq{}}\PYG{p}{:}
        \PYG{c+c1}{\PYGZsh{} Exclude this feature}
        \PYG{k}{continue}
    \PYG{k}{if} \PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{gd\PYGZus{}feature\PYGZus{}set}\PYG{p}{)} \PYG{o}{\PYGZpc{}} \PYG{l+m+mi}{2} \PYG{o}{==} \PYG{l+m+mi}{0}\PYG{p}{:}
        \PYG{n}{color} \PYG{o}{=} \PYG{n}{colors}\PYG{o}{.}\PYG{n}{blue}
    \PYG{k}{else}\PYG{p}{:}
        \PYG{n}{color} \PYG{o}{=} \PYG{n}{colors}\PYG{o}{.}\PYG{n}{lightblue}
    \PYG{n}{gd\PYGZus{}feature\PYGZus{}set}\PYG{o}{.}\PYG{n}{add\PYGZus{}feature}\PYG{p}{(}\PYG{n}{feature}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{n}{color}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)}
\end{Verbatim}
