code: def estimate_page_angle(polys: np.ndarray) -> float:
      """Takes a batch of rotated previously ORIENTED polys (N, 4, 2) (rectified by the classifier) and return the
      estimated angle ccw in degrees
      """
      # Compute mean left points and mean right point with respect to the reading direction (oriented polygon)
      xleft = polys[:, 0, 0] + polys[:, 3, 0]
      yleft = polys[:, 0, 1] + polys[:, 3, 1]
      xright = polys[:, 1, 0] + polys[:, 2, 0]
      yright = polys[:, 1, 1] + polys[:, 2, 1]
      return float(
          np.median(np.arctan((yleft - yright) / (xright - xleft)))
          * 180
          / np.pi
      )
  
file_path: doctr/doctr/utils/geometry.py
imports: from copy import deepcopy
  from math import ceil
  from typing import List, Optional, Tuple, Union
  import cv2
  import numpy
  from .common_types import BoundingBox, Polygon4P
label_desc: Use image node_id 11 for calling a global function with example usage: estimate_page_angle(polys) and returns: float