code: def _predictor(
      det_arch: Any,
      reco_arch: Any,
      pretrained: bool,
      pretrained_backbone: bool = True,
      assume_straight_pages: bool = True,
      preserve_aspect_ratio: bool = True,
      symmetric_pad: bool = True,
      det_bs: int = 2,
      reco_bs: int = 128,
      detect_orientation: bool = False,
      straighten_pages: bool = False,
      detect_language: bool = False,
      **kwargs,
  ) -> OCRPredictor:
      # Detection
      det_predictor = detection_predictor(
          det_arch,
          pretrained=pretrained,
          pretrained_backbone=pretrained_backbone,
          batch_size=det_bs,
          assume_straight_pages=assume_straight_pages,
          preserve_aspect_ratio=preserve_aspect_ratio,
          symmetric_pad=symmetric_pad,
      )
  
      # Recognition
      reco_predictor = recognition_predictor(
          reco_arch,
          pretrained=pretrained,
          pretrained_backbone=pretrained_backbone,
          batch_size=reco_bs,
      )
  
      return OCRPredictor(
          det_predictor,
          reco_predictor,
          assume_straight_pages=assume_straight_pages,
          preserve_aspect_ratio=preserve_aspect_ratio,
          symmetric_pad=symmetric_pad,
          detect_orientation=detect_orientation,
          straighten_pages=straighten_pages,
          detect_language=detect_language,
          **kwargs,
      )
  
file_path: doctr/doctr/models/zoo.py
imports: from typing import Any
  from .detection.zoo import detection_predictor
  from .kie_predictor import KIEPredictor
  from .predictor import OCRPredictor
  from .recognition.zoo import recognition_predictor
label_desc: Use image node_id 1 for calling a global function with example usage: _predictor(det_arch, reco_arch, pretrained, pretrained_backbone, assume_straight_pages, preserve_aspect_ratio, symmetric_pad, det_bs, reco_bs, detect_orientation, straighten_pages, detect_language) and returns: OCRPredictor