code: def prepare_dataset(
      dataset,
      batch_size,
      shuffle,
      seed,
      class_names,
      output_sequence_length,
      ragged,
  ):
      dataset = dataset.prefetch(tf.data.AUTOTUNE)
      if batch_size is not None:
          if shuffle:
              dataset = dataset.shuffle(
                  buffer_size=batch_size * 8, seed=seed
              )
  
          if output_sequence_length is None and not ragged:
              dataset = dataset.padded_batch(
                  batch_size, padded_shapes=([None, None], [])
              )
          else:
              dataset = dataset.batch(batch_size)
      else:
          if shuffle:
              dataset = dataset.shuffle(buffer_size=1024, seed=seed)
  
      # Users may need to reference `class_names`.
      dataset.class_names = class_names
      return dataset
  
file_path: keras/keras/utils/audio_dataset_utils.py
imports: import numpy
  from keras.api_export import keras_export
  from keras.utils import dataset_utils
  from keras.utils.module_utils import tensorflow
  from keras.utils.module_utils import tensorflow_io
label_desc: Use image node_id 2 for calling a global function with example usage: prepare_dataset(dataset, batch_size, shuffle, seed, class_names, output_sequence_length, ragged) and returns: dataset