code: def testFftnErrors(self, inverse, real):
      rng = jtu.rand_default(self.rng())
      name = "fftn"
      if real:
          name = "r" + name
      if inverse:
          name = "i" + name
      func = _get_fftn_func(jnp.fft, inverse, real)
      self.assertRaisesRegex(
          ValueError,
          "jax.numpy.fft.{} only supports 1D, 2D, and 3D FFTs. "
          "Got axes None with input rank 4.".format(name),
          lambda: func(rng([2, 3, 4, 5], dtype=np.float64), axes=None),
      )
      self.assertRaisesRegex(
          ValueError,
          f"jax.numpy.fft.{name} does not support repeated axes. Got axes \\[1, 1\\].",
          lambda: func(rng([2, 3], dtype=np.float64), axes=[1, 1]),
      )
      self.assertRaises(
          ValueError,
          lambda: func(rng([2, 3], dtype=np.float64), axes=[2]),
      )
      self.assertRaises(
          ValueError,
          lambda: func(rng([2, 3], dtype=np.float64), axes=[-3]),
      )
  
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 6 for calling the FftTest obj's underlying member method code with example usage: obj.testFftnErrors(inverse, real) without return types