def __setitem__(self, k, v):
        _keys = self.keys()
        if k not in _keys:
            log.debug('registering assertion: {name!r}, with function: {func!r}'.format(name=k, func=v))
        elif self[k] is not v:  # existing key with new assertion function
            log.debug('re-registering assertion: {name!r}, with new function: {func!r}'.format(name=k, func=v))
        elif self[k] is v:  # same key, same function
            return
        return super(AssertionsMap, self).__setitem__(k, v)
dataset/ETHPy150Open heynemann/preggy/preggy/utils.py/AssertionsMap.__setitem__/original