code: def translate_jvp(jvpfun, fun, argnum):
      if jvpfun is None:
          return lambda g, ans, *a, **k: vspace(ans).zeros()
      elif jvpfun == "same":
          return lambda g, ans, *args, **kwargs: fun(
              *subval(args, argnum, g), **kwargs
          )
      elif callable(jvpfun):
          return jvpfun
      else:
          raise Exception(
              "Bad JVP '{}' for '{}'".format(jvpfun, fun.__name__)
          )
  
imports: from itertools import count
  from functools import reduce
  from .tracer import trace, primitive, toposort, Node, Box, isbox, getval
  from .util import func, subval
  import warnings
label_desc: Use image node_id 11 for calling a global function with example usage: translate_jvp(jvpfun, fun, argnum) and returns: function, function, jvpfun