code: def find_likely_rectangles(contours, sigma):
      contours = sorted(contours, key=cv2.contourArea, reverse=True)[
          :10
      ]
      possible = []
      for c in contours:
          # approximate the contour
          peri = cv2.arcLength(c, True)
          approx = cv2.approxPolyDP(c, sigma * peri, True)
          box = make_box(approx)
          possible.append(box)
  
      return possible
  
imports: import os
  import traceback
  import sys
  import cv2
  import numpy
  from PIL import Image
  from scipy.ndimage.filters import rank_filter
  import pytesseract
label_desc: Use image node_id 5 for calling a global function with example usage: find_likely_rectangles(contours, sigma) and returns: possible