def nameInternalNodes(tree):
    """Given a bio python tree without named internal nodes, name
them. This obliterates anything names that might have been inside
already (e.g. if confidence values have been put in the name field)."""
    for j, n in enumerate(tree.get_nonterminals()):
        n.name = 'i' + str(j)
    return tree
