presto-main/src/main/java/io/prestosql/sql/planner/PlanFragment.java/PlanFragment/findRemoteSourceNodes
class PlanFragment:    private static void findRemoteSourceNodes(PlanNode node, ImmutableList.Builder<RemoteSourceNode> builder)
    {
        for (PlanNode source : node.getSources()) {
            findRemoteSourceNodes(source, builder);
        }

        if (node instanceof RemoteSourceNode) {
            builder.add((RemoteSourceNode) node);
        }
    }