code: def _sorted_interpolate(x, y, x_eval):
      """utility function for binned_Cminus"""
      # note that x should be sorted
      N = len(x)
      ind = x.searchsorted(x_eval)
      ind[ind == N] = N - 1
  
      y_eval = np.zeros(x_eval.shape)
  
      # find perfect matches
      match = (x[ind] == x_eval) | (x_eval > x[-1]) | (x_eval < x[0])
      y_eval[match] = y[ind[match]]
  
      ind = ind[~match]
  
      # take care of extrapolation
      ind[ind == 0] = 1
  
      x_lo = x[ind - 1]
      x_up = x[ind]
  
      y_lo = y[ind - 1]
      y_up = y[ind]
  
      # take care of places where x_lo = x_up
  
      y_eval[~match] = y_lo + (x_eval[~match] - x_lo) * (
          y_up - y_lo
      ) / (x_up - x_lo)
  
      return y_eval
  
imports: import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: _sorted_interpolate(x, y, x_eval) and returns: y_eval