code: def apply(self, sample: Sample) -> Sample:
      try:
          return sample.new_inputs(
              self._apply_single(sample.inputs, sample.meta)
          )
      except Exception as e:
          logger.exception(e)
          logger.warning(
              "There was an unknown error when processing a line image. The line is skipped.\n"
              f"The error was caused by the line with meta data: {sample.meta}.\n"
              f"Please report this as an issue including the meta data, stack trace,  the respective "
              f"image file and call.\n"
              f"You can ignore this error if it occurs only very rarely, only this particular line will "
              f"be skipped."
          )
          return sample.new_invalid()
  
file_path: calamari/calamari_ocr/ocr/dataset/imageprocessors/data_preprocessor.py
imports: from abc import ABC, abstractmethod
  from tfaip.data.pipeline.definitions import Sample
  from tfaip.data.pipeline.processor.dataprocessor import MappingDataProcessor, T
  import logging
label_desc: Use image node_id 1 for calling the ImageProcessor obj's underlying member method code with example usage: obj.apply(sample) and returns: sample, sample