def get_representatives(mapping, seqs):
 for (label, seq) in seqs:
  if (label in mapping):
   seq = BiologicalSequence(seq, id=('%s: %d' % (label, (len(mapping[label]) + 1))))
   (yield seq.upper())

def get_representatives ( mapping , seqs ) : for ( label , seq ) in seqs : if ( label in mapping ) : seq = BiologicalSequence ( seq , id = ( '%s: %d' % ( label , ( len ( mapping [ label ] ) + 1 ) ) ) ) ( yield seq . upper ( ) )
returns representative seqs .