code: def sentry_wrapper(func):
      def wrapper(*args, **kwargs):
          with hub:
              try:
                  return func(*args, **kwargs)
              except:
                  sentry_sdk.capture_exception()
                  sentry_sdk.flush()
                  raise
  
      return wrapper
  
file_path: cortex/python/client/cortex/telemetry.py
imports: import os
  from typing import Dict
  from uuid import uuid4
  import sentry_sdk
  from cortex import util
  from cortex.consts import CORTEX_VERSION, CORTEX_TELEMETRY_SENTRY_DSN, CORTEX_TELEMETRY_SENTRY_ENVIRONMENT
  from cortex.exceptions import CortexBinaryException
  from sentry_sdk.integrations.dedupe import DedupeIntegration
  from sentry_sdk.integrations.modules import ModulesIntegration
  from sentry_sdk.integrations.stdlib import StdlibIntegration
label_desc: Use image node_id 3 for calling a global function with example usage: sentry_wrapper(func) and returns: wrapper, func