code: def test_valid_model_config(content_type, accept_type):
      model_name = "xgboost-model"
      instance_type = "ml.c5.xlarge"
      instance_count = 1
      custom_attributes = "c000b4f9-df62-4c85-a0bf-7c525f9104a4"
      target_model = "target_model_name"
      accelerator_type = "ml.eia1.medium"
      content_template = (
          '{"instances":$features}'
          if content_type == "application/jsonlines"
          else "$records"
          if content_type == "application/json"
          else None
      )
      record_template = (
          "$features_kvp"
          if content_type == "application/json"
          else None
      )
      model_config = ModelConfig(
          model_name=model_name,
          instance_type=instance_type,
          instance_count=instance_count,
          accept_type=accept_type,
          content_type=content_type,
          content_template=content_template,
          record_template=record_template,
          custom_attributes=custom_attributes,
          accelerator_type=accelerator_type,
          target_model=target_model,
      )
      expected_config = {
          "model_name": model_name,
          "instance_type": instance_type,
          "initial_instance_count": instance_count,
          "accept_type": accept_type,
          "content_type": content_type,
          "custom_attributes": custom_attributes,
          "accelerator_type": accelerator_type,
          "target_model": target_model,
      }
      if content_template is not None:
          expected_config["content_template"] = content_template
      if record_template is not None:
          expected_config["record_template"] = record_template
      assert expected_config == model_config.get_predictor_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 12 for calling a global function with example usage: test_valid_model_config(content_type, accept_type) without return types