code: def to_dict(self):
      return {
          "n_folds": self.n_folds,
          "data_generator_params": self.data_generator_params.to_dict(),
          "output_dir": self.output_dir,
          "folds": self.folds,
      }
  
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 1 for calling the CrossFold obj's underlying member method code with example usage: obj.to_dict() and returns: dict