code: def backward_pass(g, end_node):
      outgrads = {end_node: (g, False)}
      for node in toposort(end_node):
          outgrad = outgrads.pop(node)
          ingrads = node.vjp(outgrad[0])
          for parent, ingrad in zip(node.parents, ingrads):
              outgrads[parent] = add_outgrads(
                  outgrads.get(parent), ingrad
              )
      return outgrad[0]
  
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 2 for calling a global function with example usage: backward_pass(g, end_node) and returns: outgrad