sqlalchemy filter nested relationship