code: def deserialize_exception_from_s3(
      sagemaker_session: Session, s3_uri: str, hmac_key: str
  ) -> Any:
      """Downloads from S3 and then deserializes exception.
  
      Args:
          sagemaker_session (sagemaker.session.Session):
              The underlying sagemaker session which AWS service calls are delegated to.
          s3_uri (str): S3 root uri to which resulting serialized artifacts will be uploaded.
          hmac_key (str): Key used to calculate hmac-sha256 hash of the serialized exception.
      Returns :
          Deserialized exception with traceback.
      Raises:
          DeserializationError: when fail to serialize object to bytes.
      """
  
      metadata = _MetaData.from_json(
          _read_bytes_from_s3(
              f"{s3_uri}/metadata.json", sagemaker_session
          )
      )
  
      bytes_to_deserialize = _read_bytes_from_s3(
          f"{s3_uri}/payload.pkl", sagemaker_session
      )
  
      _perform_integrity_check(
          expected_hash_value=metadata.sha256_hash,
          secret_key=hmac_key,
          buffer=bytes_to_deserialize,
      )
  
      return CloudpickleSerializer.deserialize(
          f"{s3_uri}/payload.pkl", bytes_to_deserialize
      )
  
imports: from __future__ import absolute_import
  import dataclasses
  import json
  import io
  import sys
  import hmac
  import hashlib
  import pickle
  from typing import Any, Callable, Union
  import cloudpickle
  from tblib import pickling_support
  from sagemaker.remote_function.errors import ServiceError, SerializationError, DeserializationError
  from sagemaker.s3 import S3Downloader, S3Uploader
  from sagemaker.session import Session
  from ._custom_dispatch_table import dispatch_table
label_desc: Use image node_id 9 for calling a global function with example usage: deserialize_exception_from_s3(sagemaker_session, s3_uri, hmac_key) and returns: CloudpickleSerializer