def validate_dialog(dialog, max_turns):
    """ Check if the dialog consists of multiple turns with equal or 
        less than max_turns by two users without truncated tweets.
        Args:
            dialog: target dialog
            max_turns: upper bound of #turns per dialog
        Return:
            True if the conditions are all satisfied
            False, otherwise
    """
    if len(dialog) > max_turns:
        return False
    # skip dialogs including truncated tweets or more users
    users = set()
    for utterance in dialog:
        for tid,tweet in utterance.items():
            if tweet['truncated'] == True:
                return False
            users.add(tweet['user']['id'])
    if len(users) != 2:
        return False
    return True