code: def apply(self, sample: Sample) -> Sample:
      if sample.targets and "gt" in sample.targets:
          sample.targets["sentence"] = "".join(
              self.data_params.codec.decode(sample.targets["gt"])
          )
      if sample.outputs:
  
          def decode(suffix):
              outputs = self.ctc_decoder.decode(
                  sample.outputs["softmax" + suffix].astype(float)
              )
              outputs.labels = list(map(int, outputs.labels))
              outputs.sentence = "".join(
                  self.data_params.codec.decode(outputs.labels)
              )
              return outputs
  
          outputs = decode("")
          outputs.voter_predictions = []
          for i in range(self.data_params.ensemble):
              outputs.voter_predictions.append(decode(f"_{i}"))
  
          sample = sample.new_outputs(outputs)
      return sample
  
file_path: calamari/calamari_ocr/ocr/dataset/postprocessors/ctcdecoder.py
imports: from dataclasses import dataclass, field
  from typing import Type
  from paiargparse import pai_dataclass
  from tfaip.data.pipeline.definitions import PipelineMode, Sample
  from tfaip.data.pipeline.processor.dataprocessor import MappingDataProcessor, DataProcessorParams
  from calamari_ocr.ocr.model.ctcdecoder.ctc_decoder import create_ctc_decoder, CTCDecoderParams
label_desc: Use image node_id 3 for calling the CTCDecoderProcessor obj's underlying member method code with example usage: obj.apply(sample) and returns: sample, outputs