code: def nonsingular(
      vmin, vmax, expander=0.001, tiny=1e-15, increasing=True
  ):
      """
      Modify the endpoints of a range as needed to avoid singularities.
  
      Parameters
      ----------
      vmin, vmax : float
          The initial endpoints.
      expander : float, default: 0.001
          Fractional amount by which *vmin* and *vmax* are expanded if
          the original interval is too small, based on *tiny*.
      tiny : float, default: 1e-15
          Threshold for the ratio of the interval to the maximum absolute
          value of its endpoints.  If the interval is smaller than
          this, it will be expanded.  This value should be around
          1e-15 or larger; otherwise the interval will be approaching
          the double precision resolution limit.
      increasing : bool, default: True
          If True, swap *vmin*, *vmax* if *vmin* > *vmax*.
  
      Returns
      -------
      vmin, vmax : float
          Endpoints, expanded and/or swapped if necessary.
          If either input is inf or NaN, or if both inputs are 0 or very
          close to zero, it returns -*expander*, *expander*.
      """
  
      if (not np.isfinite(vmin)) or (not np.isfinite(vmax)):
          return -expander, expander
  
      swapped = False
      if vmax < vmin:
          vmin, vmax = vmax, vmin
          swapped = True
  
      # Expand vmin, vmax to float: if they were integer types, they can wrap
      # around in abs (abs(np.int8(-128)) == -128) and vmax - vmin can overflow.
      vmin, vmax = map(float, [vmin, vmax])
  
      maxabsvalue = max(abs(vmin), abs(vmax))
      if maxabsvalue < (1e6 / tiny) * np.finfo(float).tiny:
          vmin = -expander
          vmax = expander
  
      elif vmax - vmin <= maxabsvalue * tiny:
          if vmax == 0 and vmin == 0:
              vmin = -expander
              vmax = expander
          else:
              vmin -= expander * abs(vmin)
              vmax += expander * abs(vmax)
  
      if swapped and not increasing:
          vmin, vmax = vmax, vmin
      return vmin, vmax
  
file_path: holoviews/holoviews/util/locator.py
imports: import math
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: nonsingular(vmin, vmax, expander, tiny, increasing) and returns: vmin,  vmax, unknown,  expander