Moved code snippet that finds the parents of terminal node pairs to a seperate method, since I need this for the BartProposal class.