docstr: Create a dataset from memory
  Since this dataset already contains all data in the memory, this dataset may not be loaded
  Parameters
  ----------
docstr_tok: ["Create","a","dataset","from","memory","Since","this","dataset","already","contains","all","data","in","the","memory",",","this","dataset","may","not","be","loaded","Parameters","--","--","--","--","--"]
code: def __init__(
      self,
      mode: PipelineMode,
      params: GeneratedLineDatasetParams,
  ):
      """Create a dataset from memory
      Since this dataset already contains all data in the memory, this dataset may not be loaded
      Parameters
      ----------
      """
      super().__init__(mode, params)
  
      self._samples = [
          {"id": "{}".format(i)}
          for i in range(self.params.lines_per_epoch)
      ]
      self.text_generator_params = self.params.text_generator
      self.line_generator_params = self.params.line_generator
      self.manager = Manager()
      self.data_queue = self.manager.Queue(50)
      self.data_generators = [
          LineGeneratorProcess(
              self.data_queue,
              self.text_generator_params,
              self.line_generator_params,
              "{}".format(i),
          )
          for i in range(8)
      ]
      for d in self.data_generators:
          d.start()
  
file_path: calamari/calamari_ocr/ocr/dataset/datareader/generated_line_dataset/dataset.py
imports: import logging
  import random
  from multiprocessing import Process, Queue, Manager
  import numpy
  from tfaip.data.pipeline.definitions import PipelineMode
  from calamari_ocr.ocr.dataset.datareader.base import CalamariDataGenerator, InputSample, SampleMeta
  from calamari_ocr.ocr.dataset.datareader.generated_line_dataset.params import GeneratedLineDatasetParams
  from calamari_ocr.ocr.dataset.datareader.generated_line_dataset.line_generator import LineGenerator
  from calamari_ocr.ocr.dataset.datareader.generated_line_dataset.text_generation.text_generator import TextGenerator
label_desc: Use image node_id 1 to create a new GeneratedLineDataset object from inherited base classes: CalamariDataGenerator with example: obj = GeneratedLineDataset(mode, params)