code: def reduce_noise_edges(im):
      structuring_element = cv2.getStructuringElement(
          cv2.MORPH_RECT, (1, 1)
      )
      opening = cv2.morphologyEx(
          im, cv2.MORPH_OPEN, structuring_element
      )
      maxed_rows = rank_filter(opening, -4, size=(1, 20))
      maxed_cols = rank_filter(opening, -4, size=(20, 1))
      debordered = np.minimum(
          np.minimum(opening, maxed_rows), maxed_cols
      )
      return debordered
  
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 11 for calling a global function with example usage: reduce_noise_edges(im) and returns: debordered