code: def hook(self) -> None:
      self._orig_exit = sys.exit
      sys.exit = self.exit
      self._orig_excepthook = (
          sys.excepthook
          if sys.excepthook
          != sys.__excepthook__  # respect hooks by other libraries like pdb
          else None
      )
      sys.excepthook = self.exc_handler
  
file_path: wandb/wandb/sdk/lib/exit_hooks.py
imports: import sys
  import traceback
  from types import TracebackType
  from typing import TYPE_CHECKING, Optional, Type
  import wandb
  from wandb.errors import Error
label_desc: Use image node_id 2 for calling the ExitHooks obj's underlying member method code with example usage: obj.hook() without return types