code: def _teardown(self, exit_code: int) -> None:
      unregister_all_post_import_hooks()
  
      if self._atexit_lambda:
          atexit.unregister(self._atexit_lambda)
          self._atexit_lambda = None
  
      try:
          self._inform_teardown(exit_code)
          result = self._service.join()
          if result and not self._settings._notebook:
              os._exit(result)
      except Exception as e:
          wandb.termlog(
              f"While tearing down the service manager. The following error has occurred: {e}",
              repeat=False,
          )
      finally:
          self._token.reset_environment()
  
imports: import atexit
  import os
  from typing import TYPE_CHECKING, Any, Callable, Dict, Optional
  import psutil
  import wandb
  from wandb import env, trigger
  from wandb.errors import Error
  from wandb.sdk.lib.exit_hooks import ExitHooks
  from wandb.sdk.lib.import_hooks import unregister_all_post_import_hooks
label_desc: Use image node_id 5 for calling the _Manager obj's underlying member method code with example usage: obj._teardown(exit_code) without return types