code: def testRfftfreq(self, size, d, dtype):
      rng = jtu.rand_default(self.rng())
      args_maker = lambda: (rng([size], dtype),)
      jnp_op = jnp.fft.rfftfreq
      np_op = np.fft.rfftfreq
      jnp_fn = lambda a: jnp_op(size, d=d)
      np_fn = lambda a: np_op(size, d=d)
      # 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 dtype in inexact_dtypes:
          tol = 0.15  # TODO(skye): can we be more precise?
          jtu.check_grads(
              jnp_fn, args_maker(), order=2, atol=tol, rtol=tol
          )
  
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 14 for calling the FftTest obj's underlying member method code with example usage: obj.testRfftfreq(size, d, dtype) without return types