code: def write_csv(csv_file, list_combined):
      # csv writer has different behaviour in python 2/3
      if sys.version_info[0] >= 3:
          with open(
              csv_file, "w", newline="", encoding="utf8"
          ) as csvfile:
              file_writer = csv.writer(csvfile)
              for list_temp in list_combined:
                  file_writer.writerow(list_temp)
      else:
          with open(csv_file, "wb") as csvfile:
              file_writer = csv.writer(csvfile, delimiter=",")
              for list_temp in list_combined:
                  file_writer.writerow(list_temp)
      return
  
file_path: NiftyNet/niftynet/utilities/util_csv.py
imports: from __future__ import absolute_import, print_function, division
  import csv
  import os
  import sys
  from difflib import SequenceMatcher
  import numpy
  from niftynet.io.misc_io import touch_folder
  from niftynet.utilities.filename_matching import KeywordsMatching
label_desc: Use image node_id 6 for calling a global function with example usage: write_csv(csv_file, list_combined) without return types