code: def _approx_fprime_helper(xk, f, epsilon, args=(), f0=None):
      """
      See ``approx_fprime``.  An optional initial function value arg is added.
  
      """
      if f0 is None:
          f0 = f(*((xk,) + args))
      grad = numpy.zeros((len(xk),), float)
      ei = numpy.zeros((len(xk),), float)
      for k in range(len(xk)):
          ei[k] = 1.0
          d = epsilon * ei
          grad[k] = (f(*((xk + d,) + args)) - f0) / d[k]
          ei[k] = 0.0
      return grad
  
imports: from __future__ import division, print_function, absolute_import
  import warnings
  import sys
  import numpy
  from scipy._lib.six import callable, xrange
  from numpy import atleast_1d, eye, mgrid, argmin, zeros, shape, squeeze, vectorize, asarray, sqrt, Inf, asfarray, isinf
  import numpy
  from .linesearch import line_search_wolfe1, line_search_wolfe2, line_search_wolfe2, LineSearchWarning
  from scipy._lib._util import getargspec_no_self
label_desc: Use image node_id 11 for calling a global function with example usage: _approx_fprime_helper(xk, f, epsilon, args, f0) and returns: grad