code: def test_operator_spectrogram_vs_python():
      for device in ["cpu", "gpu"]:
          for batch_size in [3]:
              for center in [False, True]:
                  for nfft, window_length, window_step, shape in [
                      (256, 256, 128, (1, 4096)),
                      (256, 256, 128, (4096,)),
                      (256, 256, 128, (4096, 1)),
                      (256, 256, 128, (1, 1, 4096, 1)),
                      (16, 16, 8, (1, 1000)),
                      (10, 10, 5, (1, 1000)),
                      (None, 10, 5, (1, 1000)),
                  ]:
                      yield (
                          check_operator_spectrogram_vs_python,
                          device,
                          batch_size,
                          shape,
                          nfft,
                          window_length,
                          window_step,
                          center,
                      )
  
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 5 for calling a global function with example usage: test_operator_spectrogram_vs_python() without return types