def _unset_container(self, item):
        if item.container is not self:
            raise ContainerError("Item %s was removed from container %s but was not in it" % (item, self))
        item.container = None