code: def init_logging(name=None):
      """
      Creates a log directory with an empty log.txt file.
      :param name: custom name for the log directory (default \"%Y-%m-%d-%H-%M-%S\")
      :return: string, the relative path to the log directory
      """
      global LOGFILE
      if name is None:
          name = time.strftime("%Y-%m-%d-%H-%M-%S")
      log_dir = os.path.join(".", "logs", f"{name}")
      if not os.path.isdir(log_dir):
          os.makedirs(log_dir)
      LOGFILE = log_dir + "log.txt"
      return log_dir
  
imports: import os
  import time
  from pprint import pformat
label_desc: Use image node_id 1 for calling a global function with example usage: init_logging(name) and returns: log_dir