public static Set<Set<LogicalVertex>> computePipelinedRegions(
            final Iterable<? extends LogicalVertex> topologicallySortedVertices) {

        final Map<LogicalVertex, Set<LogicalVertex>> vertexToRegion =
                PipelinedRegionComputeUtil.buildRawRegions(
                        topologicallySortedVertices,
                        LogicalPipelinedRegionComputeUtil::getMustBePipelinedConsumedResults);

        // Since LogicalTopology is a DAG, there is no need to do cycle detection nor to merge
        // regions on cycles.
        return uniqueVertexGroups(vertexToRegion);
    }
@Test
    void testIsolatedVertices() {
        JobVertex v1 = new JobVertex("v1");
        JobVertex v2 = new JobVertex("v2");
        JobVertex v3 = new JobVertex("v3");

        Set<Set<LogicalVertex>> regions = computePipelinedRegions(v1, v2, v3);

        checkRegionSize(regions, 3, 1, 1, 1);
    }