code: def write(filename, value):
      filename_tmp = filename + ".tmp"
      with open(filename_tmp, "w") as f:
          f.write(str(value))
  
      # Atomic rename to prevent race conditions from reader
      os.rename(filename_tmp, filename)
  
file_path: horovod/test/single/data/run_safe_shell_exec.py
imports: import os
  import sys
  import time
  from horovod.runner.common.util import safe_shell_exec
label_desc: Use image node_id 1 for calling a global function with example usage: write(filename, value) without return types