private List<Cluster> getResultingClusters(Map<Node, Color> nodeClusterMapping)
    {
        Map<Color,List<Node>> clusters = new HashMap<Color, List<Node>>();
        for(Map.Entry<Node, Color> nodesCluster : nodeClusterMapping.entrySet()) {
            List<Node> clusterNodes = new ArrayList<Node>();
            Color cluster = nodesCluster.getValue();
            if (clusters.containsKey(cluster)) {
                clusterNodes = clusters.get(cluster);
            }
            
            clusterNodes.add(nodesCluster.getKey());
            clusters.put(cluster, clusterNodes);// update the list.
        }
        
        ArrayList<Cluster> clustersResult = new ArrayList<Cluster>();
        for(Map.Entry<Color, List<Node>> clusterNodes:clusters.entrySet()) {
            String clusterName = clusterNodes.getKey().getColorAsInt().toString();
            LabelPropagationCluster cluster = new LabelPropagationCluster(clusterNodes.getValue(),
                                                                                    clusterName, clusterNodes.getKey());
            clustersResult.add(cluster);
        }
        return clustersResult;
    }