code: def store(self):
      extension = self.params.pred_extension
  
      for filename, data in self.prediction.items():
          texts = data["transcripts"]
          codec = data["codec"]
          basename, ext = split_all_ext(filename)
          with h5py.File(basename + extension, "w") as file:
              dt = h5py.special_dtype(vlen=np.dtype("int32"))
              file.create_dataset(
                  "transcripts", (len(texts),), dtype=dt
              )
              file["transcripts"][...] = texts
              file.create_dataset("codec", data=list(map(ord, codec)))
  
imports: from copy import deepcopy
  from dataclasses import dataclass, field
  from random import shuffle
  from typing import Generator, List
  from paiargparse import pai_dataclass, pai_meta
  from tfaip.data.pipeline.definitions import PipelineMode
  import numpy
  import h5py
  from calamari_ocr.ocr.dataset.datareader.base import CalamariDataGenerator, InputSample, SampleMeta, CalamariDataGeneratorParams
  from calamari_ocr.utils import split_all_ext, glob_all
label_desc: Use image node_id 3 for calling the Hdf5Generator obj's underlying member method code with example usage: obj.store() without return types