code: def rect_union(crop1, crop2):
      """Union two (x1, y1, x2, y2) rects."""
      x11, y11, x21, y21 = crop1
      x12, y12, x22, y22 = crop2
      return min(x11, x12), min(y11, y12), max(x21, x22), max(y21, y22)
  
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 7 for calling a global function with example usage: rect_union(crop1, crop2) and returns: min,  min,  max,  max