Removes all instances that are not assigned to any object. Limits
        processing to ``keyword_ids`` if given.

def delete_unused(self, keyword_ids=None):
        """
        Removes all instances that are not assigned to any object. Limits
        processing to ``keyword_ids`` if given.
        """
        if keyword_ids is None:
            keywords = self.all()
        else:
            keywords = self.filter(id__in=keyword_ids)
        keywords.filter(assignments__isnull=True).delete()