code: def threshold_mask(img, thresh_bg, thresh_fg):
      dst = (img / 255.0 - thresh_bg) / (thresh_fg - thresh_bg)
      dst[np.where(dst > 1)] = 1
      dst[np.where(dst < 0)] = 0
      return dst.astype(np.float32)
  
imports: import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: threshold_mask(img, thresh_bg, thresh_fg) and returns: dst