docs: public Factor getRootFactor(ExpressionTree tree, VariableNumMap expressionVar) {
      List<Assignment> roots = Lists.newArrayList();
      if (tree.getSubstitutions().size() == 0) {
        roots.add(expressionVar.outcomeArrayToAssignment(tree.getExpressionNode()));
      } else {
        for (ExpressionTree substitution : tree.getSubstitutions()) {
          roots.add(expressionVar.outcomeArrayToAssignment(substitution.getExpressionNode()));
        }
      }
  
      return TableFactor.pointDistribution(expressionVar, roots.toArray(new Assignment[0]));
    }