def pop(self, instance):
        if isinstance(instance, self.model):
            iid = instance.get_state().iid
        else:
            iid = instance
        instance = None
        for d in (self._new, self._modified, self._deleted):
            if iid in d:
                inst = d.pop(iid)
                if instance is None:
                    instance = inst
                elif inst is not instance:
                    raise ValueError('Critical error: %s is duplicated' % iid)
        return instance
Remove ``instance`` from the :class:`SessionModel`. Instance
dataset/ETHPy150Open lsbardel/python-stdnet/stdnet/odm/session.py/SessionModel.pop