code: def ClosedNamedTempFile(contents):
      try:
          with tempfile.NamedTemporaryFile(delete=False) as f:
              file_name = f.name
              f.write(contents)
          yield file_name
      finally:
          os.unlink(file_name)
  
label_desc: Use image node_id 1 for calling a global function with example usage: ClosedNamedTempFile(contents) without return types