def _sort_links(self, links):<EOL>
eggs, no_eggs = [], []<EOL>seen = set()  <EOL>for link in links:<EOL><INDENT>if link not in seen:<EOL><INDENT>seen.add(link)<EOL>if link.egg_fragment:<EOL><INDENT>eggs.append(link)<EOL><DEDENT>else:<EOL><INDENT>no_eggs.append(link)<EOL><DEDENT><DEDENT><DEDENT>return no_eggs + eggs<EOL>
Returns elements of links in order, non-egg links first, egg links
second, while eliminating duplicates