code: def main():
      parser = argparse.ArgumentParser()
      parser.add_argument(
          "--working_dir", default=tempfile.gettempdir(), type=str
      )
      parser.add_argument("--model", required=True)
      parser.add_argument(
          "--processes", default=multiprocessing.cpu_count(), type=int
      )
      args = parser.parse_args()
  
      batch_sizes = [1, 5, 10, 20, 50]
      tab = PrettyTable(["n"] + list(map(str, batch_sizes)))
      for n_examples in [1, 10, 100, 1000]:
          results = [
              benchmark_prediction(
                  args.model, bs, args.processes, n_examples
              )
              for bs in batch_sizes
          ]
          tab.add_row([n_examples] + results)
  
      print(tab)
  
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 2 for calling a global function with example usage: main() without return types