code: def activate(self):
      with self._lock:
          this = self
  
          def exception_handler(exc_type, exc_val, exc_tb):
              header_lines = [
                  f"An uncaught exception occurred while run was active on worker {get_hostname()}.",
                  "Marking run as failed",
                  "Traceback:",
              ]
  
              traceback_lines = (
                  header_lines
                  + traceback.format_tb(exc_tb)
                  + str(exc_val).split("\n")
              )
              for _, handler in self._handlers.items():
                  handler(traceback_lines)
  
              this._previous_uncaught_exception_handler(
                  exc_type, exc_val, exc_tb
              )
  
          if self._previous_uncaught_exception_handler is None:
              self._previous_uncaught_exception_handler = sys.excepthook
              sys.excepthook = exception_handler
  
file_path: neptune-client/src/neptune/internal/utils/uncaught_exception_handler.py
imports: import logging
  import sys
  import threading
  import traceback
  import uuid
  from platform import node
  from typing import TYPE_CHECKING, Callable, List
label_desc: Use image node_id 2 for calling the UncaughtExceptionHandler obj's underlying member method code with example usage: obj.activate() without return types