code: def run(data: ExtendedPredictionDataParams):
      logger.info("Resolving files")
      logger.info(
          "Average confidence: {:.2%}".format(
              np.mean(
                  [
                      s["best_prediction"].avg_char_probability
                      for s in data.create(
                          PipelineMode.EVALUATION
                      ).samples()
                  ]
              )
          )
      )
  
file_path: calamari/calamari_ocr/scripts/compute_average_prediction_confidence.py
imports: import logging
  import numpy
  from paiargparse import PAIArgumentParser
  from tfaip.data.pipeline.definitions import PipelineMode
  from calamari_ocr.ocr.dataset.datareader.extended_prediction import ExtendedPredictionDataParams
label_desc: Use image node_id 2 for calling a global function with example usage: run(data) without return types