code: def test_shap_with_text_config(
      name_from_base,
      clarify_processor,
      clarify_processor_with_job_name_prefix,
      data_config,
      model_config,
  ):
      granularity = "paragraph"
      language = "ukrainian"
  
      shap_config = SHAPConfig(
          baseline=[
              [
                  0.26124998927116394,
                  0.2824999988079071,
                  0.06875000149011612,
              ]
          ],
          num_samples=100,
          agg_method="mean_sq",
          text_config=TextConfig(granularity, language),
      )
  
      expected_text_config = {
          "granularity": granularity,
          "language": language,
      }
      expected_predictor_config = {
          "model_name": "xgboost-model",
          "instance_type": "ml.c5.xlarge",
          "initial_instance_count": 1,
      }
      _run_test_explain(
          name_from_base,
          clarify_processor,
          clarify_processor_with_job_name_prefix,
          data_config,
          model_config,
          shap_config,
          None,
          None,
          expected_predictor_config,
          expected_text_config=expected_text_config,
      )
  
imports: from __future__ import absolute_import, print_function
  import copy
  import pytest
  from mock import MagicMock, Mock, patch
  from sagemaker import Processor, image_uris
  from sagemaker.clarify import BiasConfig, DataConfig, ModelConfig, ModelPredictedLabelConfig, PDPConfig, SageMakerClarifyProcessor, SHAPConfig, TextConfig, ImageConfig, _AnalysisConfigGenerator, DatasetType, ProcessingOutputHandler, SegmentationConfig
label_desc: Use image node_id 46 for calling a global function with example usage: test_shap_with_text_config(name_from_base, clarify_processor, clarify_processor_with_job_name_prefix, data_config, model_config) without return types