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.random((5, 2, 4, 3)),
          np.random.random((2, 3, 4)),
          np.random.random((2, 5)),
          np.random.random(5),
      ]
      for fft_test in [fft_test1, fft_test2, fft_test3, fft_test4]:
          for pt in pts:
              pytensor.gradient.verify_grad(
                  fft_test,
                  [pt],
                  n_tests=1,
                  rng=TestFourier.rng,
                  out_type="complex64",
              )
  
file_path: pytensor/tests/tensor/test_fourier.py
imports: import numpy
  import pytest
  import pytensor
  from pytensor.tensor.fourier import Fourier, fft
  from pytensor.tensor.type import dmatrix, dvector, iscalar
  from tests import unittest_tools
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