code: def benchmark_prediction(
      model, batch_size, processes, n_examples, runs=10
  ):
      params = PredictorParams(silent=True)
      predictor = Predictor.from_checkpoint(params, model)
  
      data = (np.random.random((400, 48)) * 255).astype(np.uint8)
      print(
          "Running with bs={}, proc={}, n={}".format(
              batch_size, processes, n_examples
          )
      )
      start = time.time()
      for i in range(runs):
          list(predictor.predict_raw([data] * n_examples))
      end = time.time()
  
      return (end - start) / runs
  
file_path: calamari/calamari_ocr/scripts/benchmark.py
imports: import argparse
  import tempfile
  import time
  import numpy
  from prettytable import PrettyTable
  from calamari_ocr.ocr.predict.predictor import Predictor, PredictorParams
  import multiprocessing
label_desc: Use image node_id 1 for calling a global function with example usage: benchmark_prediction(model, batch_size, processes, n_examples, runs) and returns: unknown