def setUpClass(self):
        """
        Set up the unit test by loading the dataset and training a model.
        """
        if not _HAS_XGBOOST:
            return
        if not _HAS_SKLEARN:
            return

        scikit_data = load_boston()
        dtrain = xgboost.DMatrix(
            scikit_data["data"],
            label=scikit_data["target"],
            feature_names=scikit_data["feature_names"],
        )
        xgb_model = xgboost.train({}, dtrain, 1)

        # Save the data and the model
        self.scikit_data = scikit_data
        self.xgb_model = xgb_model
        self.feature_names = self.scikit_data["feature_names"]

        # 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=scikit_data["target"], feature_names=self.feature_names_special_chars)
        # train booster
        self.xgb_model_special_chars = xgboost.train({}, dm, 1)
        # create XGBClassifier from a copy of trainer booster
        self.xgb_regressor_special_chars = xgboost.XGBRegressor(xgb_model=self.xgb_model_special_chars.copy(), n_estimators=1)
        self.xgb_regressor_special_chars.fit(x, scikit_data["target"])

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