def RemoveKeywordsForName(self, name, keywords, sync=True):
    """Removes keywords for a name.

    Args:
      name: A name which should not be associated with some keywords anymore.
      keywords: A collection of keywords.
      sync: Sync to data store immediately.
    """
    if sync:
      with data_store.DB.GetMutationPool(token=self.token) as mutation_pool:
        for keyword in set(keywords):
          mutation_pool.DeleteAttributes(
              self._KeywordToURN(keyword),
              [self.INDEX_COLUMN_FORMAT % name])
    else:
      for keyword in set(keywords):
        data_store.DB.DeleteAttributes(
            self._KeywordToURN(keyword),
            [self.INDEX_COLUMN_FORMAT % name],
            token=self.token, sync=False)
dataset/ETHPy150Open google/grr/grr/lib/keyword_index.py/AFF4KeywordIndex.RemoveKeywordsForName/original