code: def create_hdf5_file(self, output_filepath, data_group_labels=None):
      if data_group_labels is None:
          data_group_labels = list(self.data_groups.keys())
  
      hdf5_file = tables.open_file(output_filepath, mode="w")
      filters = tables.Filters(complevel=5, complib="blosc")
  
      for data_label, data_group in list(self.data_groups.items()):
          num_cases = self.total_cases * self.multiplier
  
          if num_cases == 0:
              raise Exception(
                  "WARNING: No cases found. Cannot write to file."
              )
  
          output_shape = tuple(data_group.get_shape())
  
          # Add batch dimension
          data_shape = (0,) + output_shape
  
          data_group.data_storage = hdf5_file.create_earray(
              hdf5_file.root,
              data_label,
              tables.Float32Atom(),
              shape=data_shape,
              filters=filters,
              expectedrows=num_cases,
          )
  
          # Naming convention is bad here, TODO, think about this.
          data_group.casename_storage = hdf5_file.create_earray(
              hdf5_file.root,
              "_".join([data_label, "casenames"]),
              tables.StringAtom(256),
              shape=(0, 1),
              filters=filters,
              expectedrows=num_cases,
          )
  
          data_group.affine_storage = hdf5_file.create_earray(
              hdf5_file.root,
              "_".join([data_label, "affines"]),
              tables.Float32Atom(),
              shape=(0, 4, 4),
              filters=filters,
              expectedrows=num_cases,
          )
  
      return hdf5_file
  
imports: import os
  import csv
  import numpy
  import tables
  import copy
  from tqdm import tqdm
  from deepneuro.augmentation.augment import Copy
  from deepneuro.utilities.conversion import read_image_files
  from deepneuro.data.data_group import DataGroup
  from deepneuro.data.data_load import parse_directories, parse_filepaths, parse_hdf5, parse_csv, parse_numpy
  from deepneuro.utilities.util import add_parameter
label_desc: Use image node_id 19 for calling the DataCollection obj's underlying member method code with example usage: obj.create_hdf5_file(output_filepath, data_group_labels) and returns: hdf5_file