code: def parse_hdf5(data_collection, data_hdf5, case_list=None):
      """TODO: Add support for loading in multiple hdf5s
      TODO: Keep track of open hdf5 file.
      """
  
      if data_collection.verbose:
          print("Gathering image data from...")
  
      open_hdf5 = tables.open_file(data_hdf5, "r")
  
      for data_group in open_hdf5.root._f_iter_nodes():
          if (
              "_affines" not in data_group.name
              and "_casenames" not in data_group.name
          ):
              # Affines and Casenames. Also not great praxis.
              data_collection.data_groups[
                  data_group.name
              ].data_affines = getattr(
                  open_hdf5.root, data_group.name + "_affines"
              )
              data_collection.data_groups[
                  data_group.name
              ].data_casenames = getattr(
                  open_hdf5.root, data_group.name + "_casenames"
              )
  
              # There's some double-counting here. TODO: revise, chop down one or the other.
              data_collection.data_groups[data_group.name].cases = list(
                  range(data_group.shape[0])
              )
              data_collection.data_groups[
                  data_group.name
              ].case_num = data_group.shape[0]
              data_collection.cases = list(range(data_group.shape[0]))
  
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 2 for calling a global function with example usage: parse_hdf5(data_collection, data_hdf5, case_list) without return types