code: def testFftn(self, inverse, real, shape, dtype, axes, s, norm):
      rng = jtu.rand_default(self.rng())
      args_maker = lambda: (rng(shape, dtype),)
      jnp_op = _get_fftn_func(jnp.fft, inverse, real)
      np_op = _get_fftn_func(np.fft, inverse, real)
      jnp_fn = lambda a: jnp_op(a, axes=axes, norm=norm)
      np_fn = (
          lambda a: np_op(a, axes=axes, norm=norm)
          if axes is None or axes
          else a
      )
      # Numpy promotes to complex128 aggressively.
      self._CheckAgainstNumpy(
          np_fn, jnp_fn, args_maker, check_dtypes=False, tol=1e-4
      )
      self._CompileAndCheck(jnp_fn, args_maker)
      # Test gradient for differentiable types.
      if config.enable_x64.value and dtype in (
          float_dtypes if real and not inverse else inexact_dtypes
      ):
          # TODO(skye): can we be more precise?
          tol = 0.15
          jtu.check_grads(
              jnp_fn, args_maker(), order=2, atol=tol, rtol=tol
          )
  
      # check dtypes
      dtype = jnp_fn(rng(shape, dtype)).dtype
      expected_dtype = jnp.promote_types(
          float if inverse and real else complex, dtype
      )
      self.assertEqual(dtype, expected_dtype)
  
imports: import itertools
  import numpy
  from absl.testing import absltest
  from absl.testing import parameterized
  import jax
  from jax import lax
  from jax import numpy
  from jax._src import config
  from jax._src import dtypes
  from jax._src import test_util
  from jax._src.numpy.util import promote_dtypes_complex
label_desc: Use image node_id 4 for calling the FftTest obj's underlying member method code with example usage: obj.testFftn(inverse, real, shape, dtype, axes, s, norm) without return types