def _get_label_id(self, label):
        """Returns a label's id if it exists, otherwise assigns
        a new id to the label and returns it.
        """
        if label not in self._label_to_id:
            self._label_to_id[label] = self._num_labels
            self._num_labels += 1
        return self._label_to_id[label]
dataset/ETHPy150Open oppia/oppia/core/domain/classifier_services.py/StringClassifier._get_label_id/original