def METHOD_NAME(self, item):
    """Updates the classification of a unit in self.classification.
    :param item: an integer that is an index in .getunits().
    """
    unit = self.getunits()[item]
    self.sourcewordcounts[item] = [
        self.wordcount(text) for text in unit.source.strings
    ]
    self.targetwordcounts[item] = [
        self.wordcount(text) for text in unit.target.strings
    ]
    classes = self.classifyunit(unit)
    #        if self.basefile.getsuggestions(item):
    #            classes.append("has-suggestion")
    for classname, matchingitems in self.classification.items():
        if (classname in classes) != (item in matchingitems):
            if classname in classes:
                self.classification[classname].append(item)
            else:
                self.classification[classname].remove(item)
            self.classification[classname].sort()