def process_re_flags(flags=None):
    """
    Specify ``flags`` supported by ``re`` module in text format, like ``'i'``
    or ``'s'`` instead of ``re.I`` or ``re.S``. If multiple ``flags`` specified
    they would connected with ``|`` (unary OR), e.g. ``'iu'`` would be
    processed as ``re.I | re.U``.

    All supported flags are: ``'i', 'l', 'm', 's', 'u', 'x'``.
    """
    if flags:
        old_flags = flags
        flags = None

        for flag in old_flags:
            flag = flag.lower()

            if not RE_FLAGS in flag:
                continue

            flag = RE_FLAGS[flag]

            if flags is None:
                flags = flag
            else:
                flags |= flag

    return flags or 0
dataset/ETHPy150Open playpauseandstop/tddspry/tddspry/utils.py/process_re_flags/swapped operands of `in`