code: def reset_exiter(cls, exiter):
      
      assert(isinstance(exiter, Exiter))
      # NB: mutate the class variables! This is done before mutating the exception hook, because the
      # uncaught exception handler uses cls._exiter to exit.
      cls._exiter = exiter
      # NB: mutate process-global state!
      sys.excepthook = cls._log_unhandled_exception_and_exit
docs: Class state:
      - Overwrites `cls._exiter`.
      Python state:
      - Overwrites sys.excepthook.