code: def read_raw_file(file_in, iter=False):
      """read parameter and solution trajectory log file in 'raw' format
  
      file_in is a str log file path, with format:
  
      # header
      id = ...
      params = ...
      cost = ...
  
      `id` is a tuple of (iteration, id), with `id` an int or None
      `params` is a list[float], and is the input to the cost function
      `cost` is a float or tuple[float], and is the output of the cost function
  
      if iter is True, return (id,params,cost) otherwise return (params,cost)
  
      NOTE: params are stored how they are stored in monitor.x
      """
      if iter:
          ids, params, cost = read_import(
              file_in, "id", "params", "cost"
          )
          return _process_ids(ids, len(cost)), params, cost
      else:
          return read_import(file_in, "params", "cost")
  
imports: from mystic.tools import list_or_tuple_or_ndarray
  from mystic.tools import isNull
  import sys
label_desc: Use image node_id 14 for calling a global function with example usage: read_raw_file(file_in, iter) and returns: _process_ids,  params,  cost, read_import