code: def to_prediction(self):
      self.files = sorted(glob_all(self.files))
      pred = deepcopy(self)
      pred.files = [
          split_all_ext(f)[0] + self.pred_extension for f in self.files
      ]
      return pred
  
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 2 for calling the Hdf5 obj's underlying member method code with example usage: obj.to_prediction() and returns: pred