class_docstr: Unit test class for testing xgboost converter.
class_docstr_tok: ["Unit","test","class","for","testing","xgboost","converter","."]
code: def test_conversion_special_characters_in_feature_names(self):
      # this test should fail if conversion function does not implement the
      # special characters in feature names fix
  
      # test both sklearn wrapper and raw booster
      for model in [
          self.xgb_model_special_chars,
          self.xgb_classifier_special_chars,
      ]:
          # process as usual
          output_name = "target"
          spec = xgb_converter.convert(
              model,
              self.feature_names_special_chars,
              output_name,
              mode="classifier",
              n_classes=self.n_classes,
          ).get_spec()
          self.assertIsNotNone(spec)
  
          # Test the model class
          self.assertIsNotNone(spec.description)
          self.assertEqual(
              spec.description.predictedFeatureName, output_name
          )
  
          # Test the inputs and outputs
          self.assertEqual(len(spec.description.output), 2)
          self.assertEqual(spec.description.output[0].name, output_name)
          self.assertEqual(
              spec.description.output[0].type.WhichOneof("Type"),
              "int64Type",
          )
  
          for input_type in spec.description.input:
              self.assertEqual(
                  input_type.type.WhichOneof("Type"), "doubleType"
              )
          self.assertEqual(
              sorted(self.feature_names_special_chars),
              sorted(map(lambda x: x.name, spec.description.input)),
          )
  
          # Test the linear regression parameters.
          tr = spec.treeEnsembleClassifier.treeEnsemble
          self.assertIsNotNone(tr)
  
imports: import json
  import tempfile
  import unittest
  from coremltools._deps import _HAS_SKLEARN, _HAS_XGBOOST
  from coremltools.converters import sklearn
  from coremltools.models.utils import _macos_version
label_desc: Use image node_id 4 for calling the GradientBoostingMulticlassClassifierXGboostTest obj's underlying member method code with example usage: obj.test_conversion_special_characters_in_feature_names() without return types