def query(self, model, **kwargs):
        sm = self.model(model)
        query_class = sm.manager.query_class or Query
        return query_class(sm._meta, self, **kwargs)
When doing an exclude against any kind of N-to-many relation, we need
dataset/ETHPy150Open lsbardel/python-stdnet/stdnet/odm/session.py/Session.query--crossover with--dataset/ETHPy150Open django/django/django/db/models/sql/query.py/Query.split_exclude