code: def _retrieve_serializer_from_content_type(
      content_type: MIMEType,
  ) -> BaseDeserializer:
      """Returns serializer object to use for content type."""
  
      serializer_type = CONTENT_TYPE_TO_SERIALIZER_TYPE_MAP.get(
          content_type
      )
  
      if serializer_type is None:
          raise RuntimeError(
              f"Unrecognized content type: {content_type}"
          )
  
      serializer_handle = SERIALIZER_TYPE_TO_CLASS_MAP.get(
          serializer_type
      )
  
      if serializer_handle is None:
          raise RuntimeError(
              f"Unrecognized serializer type: {serializer_type}"
          )
  
      return serializer_handle.__call__()
  
file_path: sagemaker-python-sdk/src/sagemaker/jumpstart/artifacts/predictors.py
imports: from __future__ import absolute_import
  from typing import List, Optional, Set, Type
  from sagemaker.base_deserializers import BaseDeserializer
  from sagemaker.base_serializers import BaseSerializer
  from sagemaker.jumpstart.constants import ACCEPT_TYPE_TO_DESERIALIZER_TYPE_MAP, CONTENT_TYPE_TO_SERIALIZER_TYPE_MAP, DEFAULT_JUMPSTART_SAGEMAKER_SESSION, DESERIALIZER_TYPE_TO_CLASS_MAP, JUMPSTART_DEFAULT_REGION_NAME, SERIALIZER_TYPE_TO_CLASS_MAP
  from sagemaker.jumpstart.enums import JumpStartScriptScope, MIMEType
  from sagemaker.jumpstart.utils import verify_model_region_and_return_specs
  from sagemaker.session import Session
label_desc: Use image node_id 1 for calling a global function with example usage: _retrieve_serializer_from_content_type(content_type) and returns: serializer_handle