code: def count_sources_in_cluster(n_src, cdict, rev_dict):
      
      ret_val = np.zeros((n_src), int)
      for i in range(n_src):
          try:
              key = rev_dict[i]
          except KeyError:
              key = i
          try:
              n = len(cdict[key])
          except:
              n = 0
          ret_val[i] = n
      return ret_val
docs: Make a vector  of sources in each cluster
  
      Parameters
      ----------
      n_src : number of sources 
  
      cdict : dict(int:[int,])    
          A dictionary of clusters.  Each cluster is a source index and
          the list of other source in the cluster.
  
      rev_dict : dict(int:int)    
         A single valued dictionary pointing from source index to
         cluster key for each source in a cluster.  Note that the key
         does not point to itself.
  
  
      Returns
      ----------
      `np.ndarray((n_src),int)' with the number of in the cluster a given source 
      belongs to.