def _project_filter(query, db_model, project_id):
    if db_model.__table__.columns not in 'project_id':
        raise ValueError(_("There is no `project_id` column in `%s` table.")
                         % db_model.__name__)

    if isinstance(project_id, (list, tuple, set)):
        query = query.filter(db_model.project_id.in_(project_id))
    else:
        query = query.filter(db_model.project_id == project_id)

    return query
dataset/ETHPy150Open openstack/oslo.db/oslo_db/sqlalchemy/utils.py/_project_filter/swapped operands of `not in`