code: def finalize_sample(self, sample: Sample) -> Sample:
      prediction_results = self._convert_sample_to_prediction_results(
          sample.new_outputs(sample.outputs[0])
      )
      return sample.new_outputs(
          (prediction_results, sample.outputs[1])
      ).new_meta(sample.meta[0])
  
file_path: calamari/calamari_ocr/ocr/voting/adapter.py
imports: from typing import List
  from tfaip.data.pipeline.definitions import Sample
  from tfaip.predict.multimodelvoter import MultiModelVoter
  from calamari_ocr.ocr.predict.params import PredictionResult
  from calamari_ocr.ocr.voting import voter_from_params
  from calamari_ocr.utils.output_to_input_transformer import OutputToInputTransformer
label_desc: Use image node_id 4 for calling the CalamariMultiModelVoter obj's underlying member method code with example usage: obj.finalize_sample(sample) and returns: sample