def Or(*args):
    """
    The disjunction of two or more queries
    """
    if len(args) < 2:
        raise IllegalQueryError(args)
    elif len(args) == 2:
        return '(OR %s %s)' % args
    else:
        return '(OR %s %s)' % (args[0], Or(*args[1:]))

    The disjunction of two or more queries
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/imap4.py