code: def _retrieve_deserializer_from_accept_type(
      accept_type: MIMEType,
  ) -> BaseDeserializer:
      """Returns deserializer object to use for accept type."""
  
      deserializer_type = ACCEPT_TYPE_TO_DESERIALIZER_TYPE_MAP.get(
          accept_type
      )
  
      if deserializer_type is None:
          raise RuntimeError(f"Unrecognized accept type: {accept_type}")
  
      deserializer_handle = DESERIALIZER_TYPE_TO_CLASS_MAP.get(
          deserializer_type
      )
  
      if deserializer_handle is None:
          raise RuntimeError(
              f"Unrecognized deserializer type: {deserializer_type}"
          )
  
      return deserializer_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 2 for calling a global function with example usage: _retrieve_deserializer_from_accept_type(accept_type) and returns: deserializer_handle