def setAuthors(template, authors):

    for node in domhelpers.findElementsWithAttribute(template,
                                                     "class", 'authors'):

        # First, similarly to setTitle, insert text into an <div
        # class="authors">
        container = dom.Element('span')
        for name, href in authors:
            anchor = dom.Element('a')
            anchor.setAttribute('href', href)
            anchorText = dom.Text()
            anchorText.data = name
            anchor.appendChild(anchorText)
            if (name, href) == authors[-1]:
                if len(authors) == 1:
                    container.appendChild(anchor)
                else:
                    andText = dom.Text()
                    andText.data = 'and '
                    container.appendChild(andText)
                    container.appendChild(anchor)
            else:
                container.appendChild(anchor)
                commaText = dom.Text()
                commaText.data = ', '
                container.appendChild(commaText)

        node.appendChild(container)

    # Second, add appropriate <link rel="author" ...> tags to the <head>.
    head = domhelpers.findNodesNamed(template, 'head')[0]
    authors = [dom.parseString('<link rel="author" href="%s" title="%s"/>'
                               % (href, name)).childNodes[0]
               for name, href in authors]
    head.childNodes.extend(authors)
Adds 'unauthenticated' attribute to decorated function.
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/lore/tree.py/setAuthors--crossover with--dataset/ETHPy150Open kwminnick/rackspace-dns-cli/dnsclient/utils.py/unauthenticated