'Returns elements of links in order, non-egg links first, egg links second, while eliminating duplicates'

def _sort_links(self, links):

    (eggs, no_eggs) = ([], [])
    seen = set()
    for link in links:
        if (link not in seen):
            seen.add(link)
            if link.egg_fragment:
                eggs.append(link)
            else:
                no_eggs.append(link)
    return (no_eggs + eggs)
