def manager(self, model):
        try:
            return self.router[model]
        except KeyError:
            meta = getattr(model, '_meta', model)
            if meta.type == 'structure':
                # this is a structure
                if hasattr(model, 'model'):
                    structure_model = model.model
                    if structure_model:
                        return self.manager(structure_model)
                    else:
                        manager = self.router.structure(model)
                        if manager:
                            return manager
            raise InvalidTransaction('"%s" not valid in this session' % meta)
Filters pools by highest priority
dataset/ETHPy150Open lsbardel/python-stdnet/stdnet/odm/session.py/Session.manager--crossover with--dataset/ETHPy150Open c00w/bitHopper/bitHopper/Logic/ServerLogic.py/highest_priority