code: def primal_and_adjoint_for_tracing(self, node):
      
      primal_template = grads.primals[tracing.Traceable]
      adjoint_template = grads.adjoints[tracing.Traceable]
  
      # Prep
      to_pack = node.args
      target = ast_.copy_node(self.orig_target)
      vjp = quoting.quote(self.namer.unique('%s_grad' % node.func.id))
      tmp = create.create_temp(quoting.quote('tmp'), self.namer)
      assert len(node.keywords) == 0
  
      # Full replacement of primal
      # TODO: do we need to set 'pri_call' on this?
      primal = template.replace(
          primal_template,
          namer=self.namer,
          result=target,
          fn=node.func,
          tmp=tmp,
          vjp=vjp,
          args=gast.Tuple(elts=to_pack, ctx=gast.Load()))
  
      # Building adjoint using the vjp generated with the primal
      dto_pack = gast.Tuple(
          elts=[create.create_temp_grad(arg, self.namer) for arg in to_pack],
          ctx=gast.Store())
  
      adjoint = template.replace(
          adjoint_template,
          namer=self.namer,
          result=target,
          vjp=vjp,
          dargs=dto_pack)
  
      return primal, adjoint
docs: Build the primal and adjoint of a traceable function.
  
      Args:
        node: ast.Call node of a function we wish to trace, instead of transform
  
      Returns:
        primal: new ast.Assign node to replace the original primal call
        adjoint: new ast.Assign node using the VJP generated in primal to
          calculate the adjoint.