code: def binaryTree_nodeNames(binaryTree):
      
      def fn(binaryTree, labels):
          if binaryTree.internal:
              fn(binaryTree.left, labels)
              fn(binaryTree.right, labels)
              labels[binaryTree.traversalID.mid] = labels[binaryTree.left.traversalID.mid] + "_" + labels[binaryTree.right.traversalID.mid]
              return labels[binaryTree.traversalID.mid]
          else:
              labels[binaryTree.traversalID.mid] = str(binaryTree.iD)
              return labels[binaryTree.traversalID.mid]
      labels = [None]*binaryTree.traversalID.midEnd
      fn(binaryTree, labels)
      return labels
docs: creates names for the leave and internal nodes
      of the newick tree from the leaf labels