code: def test_invalid_analysis_config(
      data_config, data_bias_config, model_config
  ):
      with pytest.raises(
          ValueError,
          match="model_config must be provided when explainability methods are selected.",
      ):
          _AnalysisConfigGenerator.bias_and_explainability(
              data_config=data_config,
              model_config=None,
              model_predicted_label_config=ModelPredictedLabelConfig(),
              explainability_config=SHAPConfig(),
              bias_config=data_bias_config,
              pre_training_methods="all",
              post_training_methods="all",
          )
  
      with pytest.raises(
          ValueError,
          match="model_config must be provided when `predicted_label_dataset_uri` or "
          "`predicted_label` are not provided in data_config.",
      ):
          _AnalysisConfigGenerator.bias(
              data_config=data_config,
              model_config=None,
              model_predicted_label_config=ModelPredictedLabelConfig(),
              bias_config=data_bias_config,
              pre_training_methods="all",
              post_training_methods="all",
          )
  
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 56 for calling a global function with example usage: test_invalid_analysis_config(data_config, data_bias_config, model_config) without return types