code: def make_numerical_jvp(f, x):
      y = f(x)
      x_vs, y_vs = vspace(x), vspace(y)
  
      def jvp(v):
          # (f(x + v*eps/2) - f(x - v*eps/2)) / eps
          f_x_plus = f(x_vs.add(x, x_vs.scalar_mul(v, EPS / 2)))
          f_x_minus = f(x_vs.add(x, x_vs.scalar_mul(v, -EPS / 2)))
          neg_f_x_minus = y_vs.scalar_mul(f_x_minus, -1.0)
          return y_vs.scalar_mul(
              y_vs.add(f_x_plus, neg_f_x_minus), 1.0 / EPS
          )
  
      return jvp
  
file_path: autograd/autograd/test_util.py
imports: from functools import partial
  from itertools import product
  from .core import make_vjp, make_jvp, vspace
  from .util import subvals
  from .wrap_util import unary_to_nary, get_name
label_desc: Use image node_id 2 for calling a global function with example usage: make_numerical_jvp(f, x) and returns: jvp, y_vs