Which are the “last two nodes” that you are talking about?
The general answer to your question is that you can override TreeLayout | GoJS API to assign whatever specific TreeVertex properties that you want for any particular Node. But I still do not understand exactly what you want and what you have implemented so far.