code: def bernsen(f, radius, contrast_threshold, gthresh=None):
      """
      thresholded = bernsen(f, radius, contrast_threshold, gthresh={128})
  
      Bernsen local thresholding
  
      Parameters
      ----------
      f : ndarray
          input image
      radius : integer
          radius of circle (to consider "local")
      contrast_threshold : integer
          contrast threshold
      gthresh : numeric, optional
          global threshold to fall back in low contrast regions
  
      Returns
      -------
      thresholded : binary ndarray
  
      See Also
      --------
      gbernsen : function
          Generalised Bernsen thresholding
      """
      from mahotas.morph import circle_se
  
      if gthresh is None:
          gthresh = 128
      return gbernsen(f, circle_se(radius), contrast_threshold, gthresh)
  
file_path: mahotas/mahotas/thresholding.py
imports: from __future__ import division
  import numpy
  from .histogram import fullhistogram
  from .None import _histogram
  from .internal import _verify_is_integer_type
label_desc: Use image node_id 4 for calling a global function with example usage: bernsen(f, radius, contrast_threshold, gthresh) and returns: gbernsen