code: def parse_csv(data_collection, data_csv, case_list=None):
      input_csvs = set()
  
      if type(data_csv) is str:
          input_csvs = [data_csv]
      else:
          for data_group_name, csv_file in list(data_csv.items()):
              input_csvs.update([csv_file])
  
      for input_csv in input_csvs:
          with open(input_csv, "r") as infile:
              csv_reader = csv.reader(infile)
              header = next(csv_reader)
              data_group_names = set(header[1:])
  
              for row in csv_reader:
                  casename = row[0]
                  data_group_files = {
                      name: [] for name in data_group_names
                  }
  
                  for idx, data_group_name in enumerate(header[1:]):
                      data_group_files[data_group_name] += [
                          row[idx + 1]
                      ]
  
                  for data_group_name in data_group_names:
                      data_collection.data_groups[
                          data_group_name
                      ].add_case(
                          casename, data_group_files[data_group_name]
                      )
  
                  data_collection.cases.append(casename)
  
      return
  
file_path: DeepNeuro/deepneuro/data/data_load.py
imports: import os
  import glob
  import csv
  import tables
  from deepneuro.utilities.util import grab_files_recursive, nifti_splitext
label_desc: Use image node_id 4 for calling a global function with example usage: parse_csv(data_collection, data_csv, case_list) without return types