code: def rec2csv(recarr, fname):
      pd.DataFrame.from_records(recarr).to_csv(fname, index=None)
  
imports: import csv
  import os
  from io import StringIO
  from os import listdir, makedirs
  from os.path import abspath, exists, isdir, splitext
  from os.path import join
  import numpy
  import pandas
  from nipy.io.api import load_image
label_desc: Use image node_id 2 for calling a global function with example usage: rec2csv(recarr, fname) without return types