code: def auto_canny(image, sigma=0.33):
      v = np.median(image)
      lower = int(max(0, (1.0 - sigma) * v))
      upper = int(min(255, (1.0 + sigma) * v))
      edged = cv2.Canny(image, lower, upper, True)
      return edged
  
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 1 for calling a global function with example usage: auto_canny(image, sigma) and returns: edged