def setUpClass(self):
        """
        Set up the unit test by loading the dataset and training a model.
        """
        scikit_data = load_boston()
        t = scikit_data["target"]
        target = np.digitize(t, np.histogram(t)[1]) - 1
        dtrain = xgboost.DMatrix(
            scikit_data["data"], label=target, feature_names=scikit_data["feature_names"]
        )
        self.xgb_model = xgboost.train({}, dtrain)
        self.target = target

        # Save the data and the model
        self.scikit_data = scikit_data
        self.n_classes = len(np.unique(self.target))

        # train a booster with special characters in feature names
        x = scikit_data['data']
        # prepare feature names with special chars
        self.feature_names_special_chars = [f'\t"{i}"\n' for i in
                                            range(x.shape[1])]
        # create training dmatrix
        dm = xgboost.DMatrix(x, label=target,
                             feature_names=self.feature_names_special_chars)
        # train booster
        self.xgb_model_special_chars = xgboost.train({}, dm)
        # create XGBClassifier from a copy of trainer booster
        self.xgb_classifier_special_chars = \
            xgboost.XGBClassifier(xgb_model=self.xgb_model_special_chars.copy())
        self.xgb_classifier_special_chars.fit(x, target)

        Set up the unit test by loading the dataset and training a model.
        
coremltools/test/xgboost_tests/test_boosted_trees_classifier.py