code: def rectify_loc_preds(
      page_loc_preds: np.ndarray,
      orientations: List[int],
  ) -> Optional[np.ndarray]:
      """Orient the quadrangle (Polygon4P) according to the predicted orientation,
      so that the points are in this order: top L, top R, bot R, bot L if the crop is readable
      """
      return (
          np.stack(
              [
                  np.roll(page_loc_pred, orientation, axis=0)
                  for orientation, page_loc_pred in zip(
                      orientations, page_loc_preds
                  )
              ],
              axis=0,
          )
          if len(orientations) > 0
          else None
      )
  
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 4 for calling a global function with example usage: rectify_loc_preds(page_loc_preds, orientations) and returns: unknown