code: def get_spectrogram(
      data_format,
      n_ch=1,
      time_dimension=256,
      freq_dimension=128,
      batch_size=1,
  ):
      src = np.random.uniform(
          low=-10, high=10, size=(time_dimension, freq_dimension)
      )
  
      src = np.expand_dims(src, axis=2)  # (time, freq, 1)
      if n_ch != 1:
          src = np.tile(src, [1, n_ch])  # (time, freq, ch))
  
      if data_format == "default":
          data_format = K.image_data_format()
  
      if data_format == "channels_last":
          input_shape = (time_dimension, freq_dimension, n_ch)
      else:
          src = np.transpose(src, (2, 0, 1))  # (ch, time, freq)
          input_shape = (n_ch, time_dimension, freq_dimension)
  
      batch_src = np.repeat([src], batch_size, axis=0)
  
      return batch_src, input_shape
  
file_path: kapre/tests/utils.py
imports: import os
  from pathlib import Path
  import shutil
  import numpy
  import tensorflow
  import tempfile
  from tensorflow.keras import backend
label_desc: Use image node_id 2 for calling a global function with example usage: get_spectrogram(data_format, n_ch, time_dimension, freq_dimension, batch_size) and returns: batch_src,  input_shape