get_upper_child function

Get the index of the upper child at a split node of a tree