code: def parse_args():
      import argparse
  
      parser = argparse.ArgumentParser(
          description="DocTR end-to-end evaluation",
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
      )
  
      parser.add_argument(
          "detection",
          type=str,
          help="Text detection model to use for analysis",
      )
      parser.add_argument(
          "recognition",
          type=str,
          help="Text recognition model to use for analysis",
      )
      parser.add_argument(
          "--iou",
          type=float,
          default=0.5,
          help="IoU threshold to match a pair of boxes",
      )
      parser.add_argument(
          "--dataset",
          type=str,
          default="FUNSD",
          help="choose a dataset: FUNSD, CORD",
      )
      parser.add_argument(
          "--img_folder",
          type=str,
          default=None,
          help="Only for local sets, path to images",
      )
      parser.add_argument(
          "--label_file",
          type=str,
          default=None,
          help="Only for local sets, path to labels",
      )
      parser.add_argument(
          "--rotation",
          dest="rotation",
          action="store_true",
          help="run rotated OCR + postprocessing",
      )
      parser.add_argument(
          "-b",
          "--batch_size",
          type=int,
          default=32,
          help="batch size for recognition",
      )
      parser.add_argument(
          "--mask_shape",
          type=int,
          default=None,
          help="mask shape for mask iou (only for rotation)",
      )
      parser.add_argument(
          "--samples",
          type=int,
          default=None,
          help="evaluate only on the N first samples",
      )
      parser.add_argument(
          "--eval-straight",
          action="store_true",
          help="evaluate on straight pages with straight bbox (to use the quick and light metric)",
      )
      args = parser.parse_args()
  
      return args
  
file_path: doctr/scripts/evaluate_kie.py
imports: import os
  from doctr.io.elements import KIEDocument
  import numpy
  from tqdm import tqdm
  from doctr import datasets
  from doctr.file_utils import is_tf_available
  from doctr.models import kie_predictor
  from doctr.utils.geometry import extract_crops, extract_rcrops
  from doctr.utils.metrics import LocalizationConfusion, OCRMetric, TextMatch
label_desc: Use image node_id 3 for calling a global function with example usage: parse_args() and returns: args