'Removes all the items from the library that have the same
path as an item from this task.'

def remove_replaced(self, lib):

    for item in self.imported_items():
        for dup_item in self.replaced_items[item]:
            log.debug(u'Replacing    item    {0}:    {1}', dup_item.id, displayable_path(item.path))
            dup_item.remove()
    log.debug(u'{0}    of    {1}    items    replaced', sum((bool(l) for l in self.replaced_items.values())), len(self.imported_items()))
