code: def add4dilate(f, c):
      from numpy import asarray, minimum, maximum, float64
  
      if not c:
          return f
      y = asarray(f, float64) + c
      k1, k2 = limits(f)
      y = ((f == k1) * k1) + ((f != k1) * y)
      y = maximum(minimum(y, k2), k1)
      return y.astype(f.dtype)
  
file_path: mahotas/mahotas/tests/pymorph_copy.py
imports: import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: add4dilate(f, c) and returns: y, f