code: def test_istft_forward_backward(
      ctx,
      seed,
      window_size,
      stride,
      fft_size,
      window_type,
      center,
      pad_mode,
      as_stft_backward,
  ):
      backend = ctx.backend[0].split(":")[0]
      if backend == "cuda":
          pytest.skip(
              "CUDA Convolution N-D is only supported in CUDNN extension"
          )
  
      if not as_stft_backward:
          if pad_mode != "constant":
              pytest.skip(
                  '`pad_mode != "constant"` is only for `as_stft_backward == True`'
              )
  
      func_name = "ISTFTCuda" if backend == "cudnn" else "ISTFT"
  
      from nbla_test_utils import function_tester
  
      rng = np.random.RandomState(seed)
  
      # Generate istft inputs by calling stft
      x_shape = create_stft_input_shape(window_size)
      stft_input = rng.randn(*x_shape).astype(np.float32)
      y_r, y_i = ref_stft(
          stft_input,
          window_size,
          stride,
          fft_size,
          window_type,
          center,
          pad_mode,
          False,
      )
      istft_inputs = [y_r, y_i]
  
      # Check violation of NOLA condition
      if not as_stft_backward:
          length = x_shape[1]
          if is_nola_violation(
              window_type, window_size, stride, fft_size, length, center
          ):
              check_nola_violation(
                  y_r,
                  y_i,
                  window_size,
                  stride,
                  fft_size,
                  window_type,
                  center,
                  pad_mode,
                  as_stft_backward,
              )
              return
  
      function_tester(
          rng,
          F.istft,
          ref_istft,
          istft_inputs,
          func_args=[
              window_size,
              stride,
              fft_size,
              window_type,
              center,
              pad_mode,
              as_stft_backward,
          ],
          ctx=ctx,
          func_name=func_name,
          atol_f=1e-5,
          atol_b=3e-2,
          dstep=1e-2,
      )
  
file_path: nnabla/python/test/function/test_istft.py
imports: from operator import is_
  import pytest
  import numpy
  import nnabla
  import nnabla.functions
  import scipy.signal
  import librosa
  from nbla_test_utils import list_context
  from test_stft import create_stft_input_shape, create_window_func, is_nola_violation, ref_stft
label_desc: Use image node_id 3 for calling a global function with example usage: test_istft_forward_backward(ctx, seed, window_size, stride, fft_size, window_type, center, pad_mode, as_stft_backward) without return types