Add function to return branch lengths in DFS order