code: def from_dict(d):
      d[
          "data_generator_params"
      ] = CalamariDataGeneratorParams.from_dict(
          d["data_generator_params"]
      )
      return CrossFold(**d)
  
file_path: calamari/calamari_ocr/ocr/training/cross_fold.py
imports: import os
  import json
  from contextlib import ExitStack
  from typing import List, Optional
  from tfaip.data.pipeline.definitions import Sample, PipelineMode
  from tfaip.util.multiprocessing.parallelmap import tqdm_wrapper
  from calamari_ocr.ocr.dataset.datareader.base import CalamariDataGeneratorParams
  from calamari_ocr.ocr.dataset.datareader.file import FileDataGenerator, FileDataParams
  from calamari_ocr.ocr.dataset.datareader.hdf5 import Hdf5DatasetWriter
label_desc: Use image node_id 2 for calling the CrossFold obj's underlying member method code with example usage: obj.from_dict(d) and returns: CrossFold