NodeDepth function

Distance of each node from tree exterior