code: def _set_file(path):
      global _FILE_HANDLER, _logger
      if os.path.isfile(path):
          try:
              os.remove(path)
          except OSError:
              pass
      hdl = logging.FileHandler(
          filename=path, encoding="utf-8", mode="w"
      )
      hdl.setFormatter(_Formatter(datefmt="%m-%d %H:%M:%S"))
  
      _FILE_HANDLER = hdl
      _logger.addHandler(hdl)
  
imports: import errno
  import logging
  import os
  import os.path
  import sys
  from termcolor import colored
  import shutil
  from datetime import datetime
label_desc: Use image node_id 4 for calling a global function with example usage: _set_file(path) without return types