code: def apply_griffin_lim(inputs, input_lens, CONFIG, ap):
      """Apply griffin-lim to each sample iterating throught the first dimension.
      Args:
          inputs (Tensor or np.Array): Features to be converted by GL. First dimension is the batch size.
          input_lens (Tensor or np.Array): 1D array of sample lengths.
          CONFIG (Dict): TTS config.
          ap (AudioProcessor): TTS audio processor.
      """
      wavs = []
      for idx, spec in enumerate(inputs):
          wav_len = (
              input_lens[idx] * ap.hop_length
          ) - ap.hop_length  # inverse librosa padding
          wav = inv_spectrogram(spec, ap, CONFIG)
          # assert len(wav) == wav_len, f" [!] wav lenght: {len(wav)} vs expected: {wav_len}"
          wavs.append(wav[:wav_len])
      return wavs
  
file_path: TTS/TTS/tts/utils/synthesis.py
imports: import pkg_resources
  import torch
  import numpy
  from .text import text_to_sequence, phoneme_to_sequence
label_desc: Use image node_id 15 for calling a global function with example usage: apply_griffin_lim(inputs, input_lens, CONFIG, ap) and returns: wavs