'Set multiple values at once.'

def MultiSet(self, subject, values, timestamp=None, replace=True, sync=True, to_delete=None, token=None):

    _ = sync
    if ((timestamp is None) or (timestamp == self.NEWEST_TIMESTAMP)):
        timestamp = (time.time() * 1000000)
    to_delete = set((to_delete or []))
    with self.cache.Get(subject) as sqlite_connection:
        if replace:
            to_delete.update(values.keys())
        if to_delete:
            for attribute in to_delete:
                sqlite_connection.DeleteAttribute(subject, attribute)
        for (attribute, seq) in values.items():
            for v in seq:
                element_timestamp = None
                if isinstance(v, (list, tuple)):
                    (v, element_timestamp) = v
                if (element_timestamp is None):
                    element_timestamp = timestamp
                element_timestamp = long(element_timestamp)
                value = self._Encode(v)
                sqlite_connection.SetAttribute(subject, attribute, value, element_timestamp)
