def ParseFlags(resp):

    mo = Flags.match(resp)
    if not mo:
        return ()

    return tuple(mo.group('flags').split())
Convert IMAP4 flags response to python tuple.
dataset/ETHPy150Open deanhiller/databus/webapp/play1.3.x/python/Lib/imaplib.py/ParseFlags