code: def translate_vjp(vjpfun, fun, argnum):
      if vjpfun is None:
          return lambda ans, *args, **kwargs: lambda g: vspace(
              args[argnum]
          ).zeros()
      elif callable(vjpfun):
          return vjpfun
      else:
          raise Exception(
              "Bad VJP '{}' for '{}'".format(vjpfun, 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 6 for calling a global function with example usage: translate_vjp(vjpfun, fun, argnum) and returns: function, vjpfun