code: def columns_to_file(columns, filename, headers=None):
      separator = ","
      with open(filename, "w", encoding="utf-8") as fp:
          fp.write("")
  
      with open(filename, "a", encoding="utf-8") as fp:
          if headers is not None:
              fp.write(separator.join(headers) + "\r\n")
          for i in range(len(columns[-1])):
              row = ""
              for col in columns:
                  row += str(col[i]) + separator
  
              fp.write(row.rstrip(separator) + "\r\n")
  
file_path: lightwood/tests/utils/data_generation.py
imports: import random
  import string
  import datetime
  from math import log
label_desc: Use image node_id 8 for calling a global function with example usage: columns_to_file(columns, filename, headers) without return types