code: def clean_up(fn):
      def run():
          try:
              atexit._clear()
              fn()
          except Exception:
              raise
          finally:
              atexit._run_exitfuncs()
  
      return run
  
file_path: autodist/tests/checkpoint/test_keras_saver.py
imports: import os
  import atexit
  import numpy
  import tensorflow
  from multiprocessing import Process
  from autodist import AutoDist
  from autodist.checkpoint.saver import Saver
label_desc: Use image node_id 1 for calling a global function with example usage: clean_up(fn) and returns: run