code: def _run_atexit():
      '''Hook frameworks must invoke this after the main hook body has
      successfully completed. Do not invoke it if the hook fails.'''
      global _atexit
      for callback, args, kwargs in reversed(_atexit):
          callback(*args, **kwargs)
      del _atexit[:f _run_atexit():
      '''Hook frameworks must invoke this after the main hook body has
      successfully completed. Do not invoke it if the hook fails.'''
      global _atexit
      for callback, args, kwargs in reversed(_atexit):
          callback(*args, **kwargs)
      del _atexit[:]
docs: Hook frameworks must invoke this after the main hook body has
      successfully completed. Do not invoke it if the hook fails.