def _get_nb_classes(self) -> int:
        """
        Return the number of output classes.

        :return: Number of classes in the data.
        """
        if self._model.classes_ is not None:
            return len(self._model.classes_)

        return -1

        Return the number of output classes.

        :return: Number of classes in the data.
        
art/estimators/classification/catboost.py