code: def _perform_integrity_check(
      expected_hash_value: str, secret_key: str, buffer: bytes
  ):
      """Performs integrity checks for serialized code/arguments uploaded to s3.
  
      Verifies whether the hash read from s3 matches the hash calculated
      during remote function execution.
      """
      actual_hash_value = _compute_hash(
          buffer=buffer, secret_key=secret_key
      )
      if not hmac.compare_digest(
          expected_hash_value, actual_hash_value
      ):
          raise DeserializationError(
              "Integrity check for the serialized function or data failed. "
              "Please restrict access to your S3 bucket"
          )
  
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 13 for calling a global function with example usage: _perform_integrity_check(expected_hash_value, secret_key, buffer) without return types