def __setattr__(self, key, value):
        try:
            object.__getattr__(self, key)
            object.__setattr__(self, key, value)
        except AttributeError:
            key = self._get_key(key)
            if key == "@context":
                value = self.get_context(value)
            elif key == "@id":
                value = self.get_id(value)
            if key[0] == "_":
                object.__setattr__(self, key, value)
            else:
                if value is None:
                    try:
                        super(Leaf, self).__delitem__(key)
                    except __HOLE__:
                        pass
                else:
                    super(Leaf, self).__setitem__(key, value)
dataset/ETHPy150Open gsi-upm/senpy/senpy/models.py/Leaf.__setattr__