code: def test_operator_decoder_and_spectrogram():
      for device in ["cpu", "gpu"]:
          for layout in ["tf", "ft"]:
              for batch_size in [3]:
                  for nfft, window_length, window_step in [
                      (256, 256, 128),
                      (256, 256, 128),
                      (256, 256, 128),
                      (
                          256,
                          256,
                          128,
                      ),
                      (
                          256,
                          256,
                          128,
                      ),
                      (
                          16,
                          16,
                          8,
                      ),
                      (
                          10,
                          10,
                          5,
                      ),
                  ]:
                      # Note: center_windows=False and nfft > window_length doesn't work like librosa.
                      # Librosa seems to disregards window_length
                      # and extract windows of nfft size regardless
                      for center in (
                          [False, True]
                          if nfft == window_length
                          else [True]
                      ):
                          yield (
                              check_operator_decoder_and_spectrogram_vs_python,
                              device,
                              batch_size,
                              nfft,
                              window_length,
                              window_step,
                              center,
                              layout,
                          )
  
imports: from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops
  import nvidia.dali.types
  import nvidia.dali
  import numpy
  from functools import partial
  from test_utils import get_files
  from test_utils import compare_pipelines
  from test_utils import RandomDataIterator
  from test_utils import ConstantDataIterator
  import librosa
  import math
label_desc: Use image node_id 9 for calling a global function with example usage: test_operator_decoder_and_spectrogram() without return types