code: def __init__(
      self,
      mode: PipelineMode,
      params: Abbyy,
  ):
      super().__init__(mode, params)
  
      self.book = XMLReader(
          self.params.images,
          self.params.xml_files,
          self.params.skip_invalid,
      ).read()
  
      for p, page in enumerate(self.book.pages):
          for l, line in enumerate(page.getLines()):
              for f, fo in enumerate(line.formats):
                  self.add_sample(
                      {
                          "image_path": page.imgFile,
                          "xml_path": page.xmlFile,
                          "id": "{}_{}_{}_{}".format(
                              split_all_ext(
                                  page.xmlFile or page.imgFile
                              )[0],
                              p,
                              l,
                              f,
                          ),
                          "line": line,
                          "format": fo,
                      }
                  )
  
imports: import logging
  from copy import deepcopy
  from dataclasses import dataclass, field
  from typing import List, Generator
  import numpy
  from paiargparse import pai_dataclass, pai_meta
  from tfaip.data.pipeline.definitions import PipelineMode, TARGETS_PROCESSOR, INPUT_PROCESSOR
  from tqdm import tqdm
  from calamari_ocr.ocr.dataset.datareader.abbyy.xml import XMLReader, XMLWriter
  from calamari_ocr.ocr.dataset.datareader.base import CalamariDataGenerator, CalamariDataGeneratorParams, InputSample, SampleMeta
  from calamari_ocr.utils import split_all_ext, glob_all
label_desc: Use image node_id 1 to create a new AbbyyGenerator object from inherited base classes: CalamariDataGenerator with example: obj = AbbyyGenerator(mode, params)