code: def func_nan(x, a, b):
      x = np.atleast_1d(x)
      f = (x - 1.0 * a) ** 3
      f[x < b] = np.nan
      if DEBUG:
          print("evaluating at {:f}, fval = {:f}".format(x, f))
      return f
  
imports: import numpy
  from statsmodels.tools.rootfinding import brentq_expanding
label_desc: Use image node_id 2 for calling a global function with example usage: func_nan(x, a, b) and returns: f