class_docstr: Tests for LAX-backed scipy.stats implementations
code: def testIstftAgainstNumpy(
      self,
      *,
      shape,
      dtype,
      fs,
      window,
      nperseg,
      noverlap,
      nfft,
      onesided,
      boundary,
      timeaxis,
      freqaxis,
  ):
      if not onesided:
          new_freq_len = (shape[freqaxis] - 1) * 2
          shape = (
              shape[:freqaxis] + (new_freq_len,) + shape[freqaxis + 1 :]
          )
  
      kwds = dict(
          fs=fs,
          window=window,
          nperseg=nperseg,
          noverlap=noverlap,
          nfft=nfft,
          input_onesided=onesided,
          boundary=boundary,
          time_axis=timeaxis,
          freq_axis=freqaxis,
      )
  
      osp_fun = partial(osp_signal.istft, **kwds)
      osp_fun = jtu.ignore_warning(
          message="NOLA condition failed, STFT may not be invertible"
      )(osp_fun)
      jsp_fun = partial(jsp_signal.istft, **kwds)
  
      tol = {
          np.float32: 1e-4,
          np.float64: 1e-6,
          np.complex64: 1e-4,
          np.complex128: 1e-6,
      }
      if jtu.test_device_matches(["tpu"]):
          tol = _TPU_FFT_TOL
  
      rng = jtu.rand_default(self.rng())
      args_maker = lambda: [rng(shape, dtype)]
  
      # Here, dtype of output signal is different depending on osp versions,
      # and so depending on the test environment.  Thus, dtype check is disabled.
      self._CheckAgainstNumpy(
          osp_fun,
          jsp_fun,
          args_maker,
          rtol=tol,
          atol=tol,
          check_dtypes=False,
      )
      self._CompileAndCheck(jsp_fun, args_maker, rtol=tol, atol=tol)
  
imports: from functools import partial
  import unittest
  from absl.testing import absltest
  import numpy
  import scipy.signal
  from jax import lax
  import jax.numpy
  from jax._src import dtypes
  from jax._src import test_util
  import jax.scipy.signal
  from jax import config
label_desc: Use image node_id 10 for calling the LaxBackedScipySignalTests obj's underlying member method code with example usage: obj.testIstftAgainstNumpy() without return types