code: def test_invalid_text_config():
      with pytest.raises(ValueError) as error:
          TextConfig(
              granularity="invalid",
              language="english",
          )
      assert (
          "Invalid granularity invalid. Please choose among ['token', 'sentence', 'paragraph']"
          in str(error.value)
      )
      with pytest.raises(ValueError) as error:
          TextConfig(
              granularity="token",
              language="invalid",
          )
      assert (
          "Invalid language invalid. Please choose among ['chinese',"
          in str(error.value)
      )
  
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 23 for calling a global function with example usage: test_invalid_text_config() without return types