code: def _set_file(path):
      global _FILE_HANDLER
      if os.path.isfile(path):
          backup_name = path + "." + _get_time_str()
          shutil.move(path, backup_name)
          _logger.info(
              "Existing log file '{}' backuped to '{}'".format(
                  path, backup_name
              )
          )  # noqa: F821
      hdl = logging.FileHandler(
          filename=path, encoding="utf-8", mode="w"
      )
      hdl.setFormatter(_MyFormatter(datefmt="%m%d %H:%M:%S"))
  
      _FILE_HANDLER = hdl
      _logger.addHandler(hdl)
      _logger.info("Argv: " + " ".join(sys.argv))
  
file_path: tensorpack/tensorpack/utils/logger.py
imports: import logging
  import os
  import os.path
  import shutil
  import sys
  from datetime import datetime
  from six.moves import input
  from termcolor import colored
label_desc: Use image node_id 3 for calling a global function with example usage: _set_file(path) without return types