def Update(self):
    if self._modified:
      if self._value.additions:
        value = list(self._value.union(self._value.additions))
      else:
        value = list(self._value.difference(self._value.deletions))

      # DynamoDB does not support PUT of empty set, so instead DELETE the attribute entirely.
      if not value:
        return db_client.UpdateAttr(None, action='DELETE')

      return db_client.UpdateAttr(value=value, action='PUT')
    else:
      if self._value.additions:
        return db_client.UpdateAttr(value=list(self._value.additions), action='ADD')
      elif self._value.deletions:
        return db_client.UpdateAttr(value=list(self._value.deletions), action='DELETE')
      else:
        assert False, 'Update called with unmodified set'
Returns an action {ADD, DELETE, PUT} and the set of values for
dataset/ETHPy150Open viewfinderco/viewfinder/backend/db/schema.py/_SetValue.Update