code: def check_fft_n(fft_fun, D, n):
      def fun(x):
          return fft_fun(x, D + n)
  
      mat = npr.randn(D, D)
      mat = match_complex(fft_fun, mat)
      check_grads(fun)(mat)
  
imports: from __future__ import absolute_import
  from functools import partial
  import autograd.numpy
  import autograd.numpy.random
  from autograd.test_util import check_grads
  from autograd import grad
  import pytest
label_desc: Use image node_id 5 for calling a global function with example usage: check_fft_n(fft_fun, D, n) and returns: fft_fun