'Commit a parsed object to disk (it is serialized and written to the
underlying file). If ``keep_parsed`` is True the parsed representation
is retained in the cache. See also: :meth:`parsed`'

def commit_item(self, name, keep_parsed=False):

    if (name not in self.parsed_cache):
        return
    data = self.serialize_item(name)
    self.dirtied.discard(name)
    if (not keep_parsed):
        self.parsed_cache.pop(name)
    dest = self.name_path_map[name]
    if (self.cloned and (nlinks_file(dest) > 1)):
        os.unlink(dest)
    with open(dest, u'wb') as f:
        f.write(data)
