code: def open_new_file(path):
      if os.path.exists(path):
          # Make sure to create a new file here so we can
          # safely hard link the output files.
          os.unlink(path)
  
      # we use the ISO-8859-1 encoding here because we only write pure
      # ASCII strings or (e.g. for file names) byte encoded strings as
      # Unicode, so we need a direct mapping from the first 256 Unicode
      # characters to a byte sequence, which ISO-8859-1 provides
  
      # note: can't use io.open() in Py2 as we may be writing str objects
      return codecs.open(path, "w", encoding="ISO-8859-1")
  
imports: from __future__ import absolute_import
  import os
  import sys
  import re
  import io
  import codecs
  import shutil
  import tempfile
  from contextlib import contextmanager
label_desc: Use image node_id 5 for calling a global function with example usage: open_new_file(path) and returns: codecs