code: def _logfile_to_support(logfile, support=None):  # .txt -> .py
      """convert logfile to support file
  
      logfile: the string path to the 3-column log file to read
      support: the str path at which to write the support file
  
      logfile is written with a LoggingMonitor [extension should be .txt]
      support is read with read_history [extension should be .py]
  
      if support is None, support name will be derived from logfile
      """
      if support is None:
          import os
  
          support = (
              os.path.splitext(os.path.basename(logfile))[0] + ".py"
          )
      from mystic.monitors import Monitor
      from mystic.munge import logfile_reader, write_support_file
  
      m = Monitor()
      step, m._x, m._y = logfile_reader(logfile, iter=True)
      if len(step) and len(step[0]) > 1:
          m._id = [j for i, j in step]
      write_support_file(m, support)
      return
  
imports: from collections.abc import Callable
label_desc: Use image node_id 5 for calling a global function with example usage: _logfile_to_support(logfile, support) without return types