code: def parse_args():
      import argparse
  
      parser = argparse.ArgumentParser(
          description="docTR evaluation script for text detection (PyTorch)",
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
      )
  
      parser.add_argument(
          "arch", type=str, help="text-detection model to evaluate"
      )
      parser.add_argument(
          "--dataset",
          type=str,
          default="FUNSD",
          help="Dataset to evaluate on",
      )
      parser.add_argument(
          "-b",
          "--batch_size",
          type=int,
          default=2,
          help="batch size for evaluation",
      )
      parser.add_argument(
          "--device", default=None, type=int, help="device"
      )
      parser.add_argument(
          "--size",
          type=int,
          default=None,
          help="model input size, H = W",
      )
      parser.add_argument(
          "-j",
          "--workers",
          type=int,
          default=None,
          help="number of workers used for dataloading",
      )
      parser.add_argument(
          "--rotation",
          dest="rotation",
          action="store_true",
          help="inference with rotated bbox",
      )
      parser.add_argument(
          "--resume",
          type=str,
          default=None,
          help="Checkpoint to resume",
      )
      parser.add_argument(
          "--amp",
          dest="amp",
          help="Use Automatic Mixed Precision",
          action="store_true",
      )
      args = parser.parse_args()
  
      return args
  
file_path: doctr/references/detection/evaluate_pytorch.py
imports: import os
  from doctr.file_utils import CLASS_NAME
  import logging
  import multiprocessing
  import time
  from pathlib import Path
  import psutil
  import torch
  from torch.utils.data import DataLoader, SequentialSampler
  from torchvision.transforms import Normalize
  from tqdm import tqdm
  from doctr import datasets
  from doctr import transforms
  from doctr.models import detection
  from doctr.utils.metrics import LocalizationConfusion
label_desc: Use image node_id 3 for calling a global function with example usage: parse_args() and returns: args