def METHOD_NAME(self, item, value):
    # load existing data
    d = self._get_nosync()
    # set key value
    if self._version == 2:
        d[item] = value
    else:
        d["attributes"][item] = value
    # _put modified data
    self._put_nosync(d)