code: def testFft2Errors(self, inverse, real):
      rng = jtu.rand_default(self.rng())
      name = "fft2"
      if real:
          name = "r" + name
      if inverse:
          name = "i" + name
      func = getattr(jnp.fft, name)
  
      self.assertRaisesRegex(
          ValueError,
          "jax.numpy.fft.{} only supports 2 axes. "
          "Got axes = \\[0\\].".format(name),
          lambda: func(rng([2, 3], dtype=np.float64), axes=[0]),
      )
      self.assertRaisesRegex(
          ValueError,
          "jax.numpy.fft.{} only supports 2 axes. "
          "Got axes = \\(0, 1, 2\\).".format(name),
          lambda: func(
              rng([2, 3, 3], dtype=np.float64), axes=(0, 1, 2)
          ),
      )
      self.assertRaises(
          ValueError,
          lambda: func(rng([2, 3], dtype=np.float64), axes=[2, 3]),
      )
      self.assertRaises(
          ValueError,
          lambda: func(rng([2, 3], dtype=np.float64), axes=[-3, -4]),
      )
  
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 11 for calling the FftTest obj's underlying member method code with example usage: obj.testFft2Errors(inverse, real) without return types