def fit(self, x: np.ndarray, y: np.ndarray, **kwargs) -> None:
        """
        Fit the classifier on the training set `(x, y)`. Only supported for models of type XGBClassifier.

        :param x: Training data.
        :param y: Target values (class labels) one-hot-encoded of shape (nb_samples, nb_classes).
        :param kwargs: Dictionary of framework-specific arguments. These should be parameters supported by the
                       `fit` function in `xgboost.XGBClassifier` and will be passed to this function as such.
        :raises `NotImplementedException`: This method is not supported for Booster objects.
        """
        import xgboost

        if isinstance(self._model, xgboost.XGBClassifier):
            self._model.fit(x, y, **kwargs)
            _nb_classes = self._get_nb_classes(self._nb_classes)
            if _nb_classes is not None:
                self._nb_classes = _nb_classes
        else:
            raise NotImplementedError

        Fit the classifier on the training set `(x, y)`. Only supported for models of type XGBClassifier.

        :param x: Training data.
        :param y: Target values (class labels) one-hot-encoded of shape (nb_samples, nb_classes).
        :param kwargs: Dictionary of framework-specific arguments. These should be parameters supported by the
                       `fit` function in `xgboost.XGBClassifier` and will be passed to this function as such.
        :raises `NotImplementedException`: This method is not supported for Booster objects.
        
art/estimators/classification/xgboost.py