code: def compute_hash(buffer: bytes, secret_key: str) -> str:
      """Compute hash value using HMAC"""
      return hmac.new(
          secret_key.encode(), msg=buffer, digestmod=hashlib.sha256
      ).hexdigest()
  
file_path: sagemaker-python-sdk/src/sagemaker/serve/validations/check_integrity.py
imports: from __future__ import absolute_import
  import secrets
  import hmac
  import hashlib
  import os
  from pathlib import Path
  from sagemaker.remote_function.core.serialization import _MetaData
label_desc: Use image node_id 2 for calling a global function with example usage: compute_hash(buffer, secret_key) and returns: hmac