presto-main/src/main/java/io/prestosql/sql/planner/planprinter/TextRenderer.java/TextRenderer/hasChildren
class TextRenderer:    private static boolean hasChildren(NodeRepresentation node, PlanRepresentation plan)
    {
        return node.getChildren().stream()
                .map(plan::getNode)
                .anyMatch(Optional::isPresent);
    }