code: def rfft_grad(get_args, irfft_fun, ans, x, *args, **kwargs):
      axes, s, norm = get_args(x, *args, **kwargs)
      vs = vspace(x)
      gvs = vspace(ans)
      check_no_repeated_axes(axes)
      if s is None:
          s = [vs.shape[i] for i in axes]
      check_even_shape(s)
  
      # s is the full fft shape
      # gs is the compressed shape
      gs = list(s)
      gs[-1] = gs[-1] // 2 + 1
      fac = make_rfft_factors(axes, gvs.shape, gs, s, norm)
  
      def vjp(g):
          g = anp.conj(g / fac)
          r = match_complex(
              x, truncate_pad((irfft_fun(g, *args, **kwargs)), vs.shape)
          )
          return r
  
      return vjp
  
file_path: autograd/autograd/numpy/fft.py
imports: from __future__ import absolute_import
  from builtins import zip
  import numpy.fft
  from .numpy_wrapper import wrap_namespace
  from .numpy_vjps import match_complex
  from .None import numpy_wrapper
  from autograd.extend import primitive, defvjp, vspace
label_desc: Use image node_id 2 for calling a global function with example usage: rfft_grad(get_args, irfft_fun, ans, x) and returns: vjp, r