code: def generate_hdf(input_fname, output_basename, batch_size):
      # Save to 2 HDF5 files for demonstration.
      df = pd.read_csv(input_fname, header=None, sep="\t")
  
      mid = len(df) // 2
      df1 = df.iloc[:mid]
      df2 = df.iloc[mid:]
  
      # We can store multiple datasets inside a single HDF5 file.
      # Separating X and Y for choosing best chunk size for data loading.
      fname1 = f"{output_basename}1.h5"
      fname2 = f"{output_basename}2.h5"
      save2hdf(
          {"Y": df1.iloc[:, :1], "X": df1.iloc[:, 1:]},
          fname1,
          batch_size,
      )
      save2hdf(
          {"Y": df2.iloc[:, :1], "X": df2.iloc[:, 1:]},
          fname2,
          batch_size,
      )
  
      return [fname1, fname2]
  
file_path: LightGBM/examples/python-guide/dataset_from_multi_hdf5.py
imports: from pathlib import Path
  import h5py
  import numpy
  import pandas
  import lightgbm
label_desc: Use image node_id 3 for calling a global function with example usage: generate_hdf(input_fname, output_basename, batch_size) and returns: list