code: def filter_samples(names, seqs, sep='.'):
      
      seen = set()
      filtered_names, filtered_seqs = [], []
      for name, seq in zip(names, seqs):
          samp = name.split(sep, 1)[0]
          if samp in seen:
              continue
          seen.add(samp)
          filtered_names.append(name)
          filtered_seqs.append(seq)
  
      nfiltered, nnames = len(filtered_names), len(names)
      assert nfiltered == len(seen)
  
      return filtered_names, filtered_seqs, seen
docs: When there are uncollapsed contigs within the same sample, only retain the
      first seq, or the seq that is most abundant (with cluster_size).