code: def get_max_width_length_ratio(contour: np.ndarray) -> float:
      """Get the maximum shape ratio of a contour.
  
      Args:
      ----
          contour: the contour from cv2.findContour
  
      Returns:
      -------
          the maximum shape ratio
      """
      _, (w, h), _ = cv2.minAreaRect(contour)
      return max(w / h, h / w)
  
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 1 for calling a global function with example usage: get_max_width_length_ratio(contour) and returns: max