Refactoring: Separated variant graph builder utility method out of DecisionTreeCreator class.