def index(document, filename, chapterReference):
    entries = domhelpers.findElementsWithAttribute(document, "class", "index")
    if not entries:
        return
    i = 0;
    for entry in entries:
        i += 1
        anchor = 'index%02d' % i
        if chapterReference:
            ref = getSectionReference(entry) or chapterReference
        else:
            ref = 'link'
        indexer.addEntry(filename, anchor, entry.getAttribute('value'), ref)
        # does nodeName even affect anything?
        entry.nodeName = entry.tagName = entry.endTagName = 'a'
        for attrName in entry.attributes.keys():
            entry.removeAttribute(attrName)
        entry.setAttribute('name', anchor)
Execute a ``machinectl pull-raw`` to download a .qcow2 or raw disk image,
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/lore/tree.py/index--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/nspawn.py/pull_raw