get_next_depth_id function

Get the id and depth of a child node.