code: def create_from_hdf5(tfrecord_dir, hdf5_filename, shuffle):
      print('Loading HDF5 archive from "%s"' % hdf5_filename)
      import h5py  # conda install h5py
  
      with h5py.File(hdf5_filename, "r") as hdf5_file:
          hdf5_data = max(
              [
                  value
                  for key, value in hdf5_file.items()
                  if key.startswith("data")
              ],
              key=lambda lod: lod.shape[3],
          )
          with TFRecordExporter(
              tfrecord_dir, hdf5_data.shape[0]
          ) as tfr:
              order = (
                  tfr.choose_shuffled_order()
                  if shuffle
                  else np.arange(hdf5_data.shape[0])
              )
              for idx in range(order.size):
                  tfr.add_image(hdf5_data[order[idx]])
              npy_filename = (
                  os.path.splitext(hdf5_filename)[0] + "-labels.npy"
              )
              if os.path.isfile(npy_filename):
                  tfr.add_labels(np.load(npy_filename)[order])
  
imports: import os
  import sys
  import glob
  import argparse
  import threading
  import six.moves.queue
  import traceback
  import numpy
  import tensorflow
  import PIL.Image
  import dnnlib.tflib
  from training import dataset
label_desc: Use image node_id 14 for calling a global function with example usage: create_from_hdf5(tfrecord_dir, hdf5_filename, shuffle) without return types