def flagsimap2keywords(flagstring):
 imapflagset = set(flagstring[1:(-1)].split())
 serverflagset = set([flag for (flag, c) in flagmap])
 return (imapflagset - serverflagset)

def flagsimap2keywords ( flagstring ) : imapflagset = set ( flagstring [ 1 : ( - 1 ) ] . split ( ) ) serverflagset = set ( [ flag for ( flag , c ) in flagmap ] ) return ( imapflagset - serverflagset )
convert string into a keyword set .