code: def test_infer_shape(self):
      a = dvector()
      self._compile_and_check(
          [a],
          [self.op(a, 16, 0)],
          [np.random.random(12)],
          self.op_class,
      )
      a = dmatrix()
      for var in [
          self.op(a, 16, 1),
          self.op(a, None, 1),
          self.op(a, 16, None),
          self.op(a, None, None),
      ]:
          self._compile_and_check(
              [a], [var], [np.random.random((12, 4))], self.op_class
          )
      b = iscalar()
      for var in [self.op(a, 16, b), self.op(a, None, b)]:
          self._compile_and_check(
              [a, b], [var], [np.random.rand(12, 4), 0], self.op_class
          )
  
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 3 for calling the TestFourier obj's underlying member method code with example usage: obj.test_infer_shape() without return types