code: def create_inv_window_func(
      window_type, window_size, stride, fft_size, length
  ):
      w = create_window_func(window_type, window_size)
  
      # Padding with zero
      if window_size < fft_size:
          diff = fft_size - window_size
          w = np.pad(w, (diff // 2, diff - diff // 2), mode="constant")
  
      w = nn.Variable.from_numpy_array(w)
      w = w.reshape((1, 1, w.shape[0]))
  
      # Overwrap add for window
      ones = F.constant(1, (1, 1, (length - fft_size) // stride + 1))
      iw = F.deconvolution(ones, w * w, stride=(stride,))
      iw.forward()
  
      # Flatten
      iw = np.reshape(iw.d, (iw.shape[2],))
  
      return iw
  
file_path: nnabla/python/test/function/test_stft.py
imports: import pytest
  import numpy
  import nnabla
  import nnabla.functions
  import librosa
  from nbla_test_utils import list_context
label_desc: Use image node_id 2 for calling a global function with example usage: create_inv_window_func(window_type, window_size, stride, fft_size, length) and returns: iw