code: def prepare_for_mode(self, mode: PipelineMode):
      self.files = sorted(glob_all(self.files))
  
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 4 for calling the Hdf5 obj's underlying member method code with example usage: obj.prepare_for_mode(mode) without return types