code: def func_nan(x, a, b):
      x = np.atleast_1d(x)
      f = (x - 1.0 * a) ** 3
      f[x < b] = np.nan
      return f
  
imports: import numpy
  from statsmodels.tools.rootfinding import brentq_expanding
  from numpy.testing import assert_allclose, assert_equal, assert_raises, assert_array_less
label_desc: Use image node_id 2 for calling a global function with example usage: func_nan(x, a, b) and returns: f