code: def test_model_config_validations():
      new_model_endpoint_definition = {
          "model_name": "xgboost-model",
          "instance_type": "ml.c5.xlarge",
          "instance_count": 1,
      }
      existing_endpoint_definition = {
          "endpoint_name": "existing_endpoint"
      }
  
      with pytest.raises(AssertionError):
          # should be one of them
          ModelConfig(
              **new_model_endpoint_definition,
              **existing_endpoint_definition,
          )
  
      with pytest.raises(AssertionError):
          # should be one of them
          ModelConfig(
              endpoint_name_prefix="prefix",
              **existing_endpoint_definition,
          )
  
      # success path for new model
      assert ModelConfig(
          **new_model_endpoint_definition
      ).predictor_config == {
          "initial_instance_count": 1,
          "instance_type": "ml.c5.xlarge",
          "model_name": "xgboost-model",
      }
  
      # success path for existing endpoint
      assert (
          ModelConfig(**existing_endpoint_definition).predictor_config
          == existing_endpoint_definition
      )
  
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 36 for calling a global function with example usage: test_model_config_validations() without return types