def _make_instance(self, descriptor, r):
        # must handle empty case.
        try:
            ins = self.klass(**dict(zip(descriptor, r)))
        except __HOLE__:
            return None
        for _, rf in ins.__dict__.items():
            if isinstance(rf, ManyToManyField) or isinstance(rf, ForeignKeyReverseField):
                rf.id = ins.id
        return ins
dataset/ETHPy150Open jasonlvhit/lunar/lunar/database.py/SelectQuery._make_instance