code: def test_gradient(self):
      def fft_test1(a):
          return self.op(a, None, None)
  
      def fft_test2(a):
          return self.op(a, None, 0)
  
      def fft_test3(a):
          return self.op(a, 4, None)
  
      def fft_test4(a):
          return self.op(a, 4, 0)
  
      pts = [
          np.random.rand(5, 2, 4, 3),
          np.random.rand(2, 3, 4),
          np.random.rand(2, 5),
          np.random.rand(5),
      ]
      for fft_test in [fft_test1, fft_test2, fft_test3, fft_test4]:
          for pt in pts:
              theano.gradient.verify_grad(
                  fft_test,
                  [pt],
                  n_tests=1,
                  rng=TestFourier.rng,
                  out_type="complex64",
              )
  
file_path: Theano/theano/tensor/tests/test_fourier.py
imports: from __future__ import absolute_import, print_function, division
  import numpy
  from numpy.testing import dec
  import theano
  from theano import tensor
  from theano.tests import unittest_tools
  from theano.tensor.fourier import Fourier, fft
label_desc: Use image node_id 4 for calling the TestFourier obj's underlying member method code with example usage: obj.test_gradient() and returns: self, self, self, self