def METHOD_NAME(user_id, status):
    """Find all invitations that are not in accepted state."""
    return db.session.query(Invitation). \
        filter(Invitation.sender_id == user_id). \
        filter(Invitation.invitation_status_code == status).all()