code: def check_operator_spectrogram_vs_python(
      device,
      batch_size,
      input_shape,
      nfft,
      window_length,
      window_step,
      center,
  ):
      eii1 = RandomDataIterator(
          batch_size, shape=input_shape, dtype=np.float32
      )
      eii2 = RandomDataIterator(
          batch_size, shape=input_shape, dtype=np.float32
      )
      compare_pipelines(
          SpectrogramPipeline(
              device,
              batch_size,
              iter(eii1),
              nfft=nfft,
              window=None,
              window_length=window_length,
              window_step=window_step,
              center=center,
          ),
          SpectrogramPythonPipeline(
              device,
              batch_size,
              iter(eii2),
              window=None,
              nfft=nfft,
              window_length=window_length,
              window_step=window_step,
              center=center,
          ),
          batch_size=batch_size,
          N_iterations=3,
          eps=1e-04,
      )
  
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 4 for calling a global function with example usage: check_operator_spectrogram_vs_python(device, batch_size, input_shape, nfft, window_length, window_step, center) without return types