code: def select_from_clusters(cluster_dict, measure_vect):
      
      out_dict = {}
      for idx_key, idx_list in cluster_dict.items():
          out_idx, out_list = select_from_cluster(
              idx_key, idx_list, measure_vect)
          out_dict[out_idx] = out_list
      return out_dict
docs: Select a single source from each cluster and make it the new cluster key
  
      cluster_dict : dict(int:[int,])        
         A dictionary of clusters.   Each cluster is a source index and the list of other source in the cluster.    
  
      measure_vect : np.narray((nsrc),float)
        vector of the measure used to select the best source in the cluster
  
      returns dict(int:[int,...])  
         New dictionary of clusters keyed by the best source in each cluster