code: def rectify_crops(
      crops: List[np.ndarray],
      orientations: List[int],
  ) -> List[np.ndarray]:
      """Rotate each crop of the list according to the predicted orientation:
      0: already straight, no rotation
      1: 90 ccw, rotate 3 times ccw
      2: 180, rotate 2 times ccw
      3: 270 ccw, rotate 1 time ccw
      """
      # Inverse predictions (if angle of +90 is detected, rotate by -90)
      orientations = [
          4 - pred if pred != 0 else 0 for pred in orientations
      ]
      return (
          [
              crop if orientation == 0 else np.rot90(crop, orientation)
              for orientation, crop in zip(orientations, crops)
          ]
          if len(orientations) > 0
          else []
      )
  
file_path: doctr/doctr/models/_utils.py
imports: from math import floor
  from statistics import median_low
  from typing import Any, Dict, List, Optional, Tuple, Union
  import cv2
  import numpy
  from langdetect import LangDetectException, detect_langs
label_desc: Use image node_id 3 for calling a global function with example usage: rectify_crops(crops, orientations) and returns: unknown