'Ensure that the specified properties are set on only the manifest item
identified by name. You can pass None as the name to remove the
property from all items.'

def apply_unique_properties(self, name, *properties):

    properties = frozenset(properties)
    (removed_names, added_names) = ([], [])
    for p in properties:
        if p.startswith(u'calibre:'):
            ensure_prefix(self.opf, None, u'calibre', CALIBRE_PREFIX)
            break
    for item in self.opf_xpath(u'//opf:manifest/opf:item'):
        iname = self.href_to_name(item.get(u'href'), self.opf_name)
        props = (item.get(u'properties') or u'').split()
        lprops = {p.lower() for p in props}
        for prop in properties:
            if (prop.lower() in lprops):
                if (name != iname):
                    removed_names.append(iname)
                    props = [p for p in props if (p.lower() != prop)]
                    if props:
                        item.set(u'properties', u'    '.join(props))
                    else:
                        del item.attrib[u'properties']
            elif (name == iname):
                added_names.append(iname)
                props.append(prop)
                item.set(u'properties', u'    '.join(props))
    self.dirty(self.opf_name)
    return (removed_names, added_names)
