class_docstr: Base class for returning a dataset.
class_docstr_tok: ["Base","class","for","returning","a","dataset","."]
docstr: Read dataset.
  
  Args:
    batch_size: Size of batch.
    shuffle: Whether to shuffle the examples.
    repeats: Number of times to repeat dataset. -1 for endless repeats.
    drop_remainder: Whether the last batch should be dropped.
  
  Returns:
    A batched tf.data.Dataset.
code: def get_batch(
      self, batch_size, shuffle=True, repeats=-1, drop_remainder=True
  ):
      """Read dataset.
  
      Args:
        batch_size: Size of batch.
        shuffle: Whether to shuffle the examples.
        repeats: Number of times to repeat dataset. -1 for endless repeats.
        drop_remainder: Whether the last batch should be dropped.
  
      Returns:
        A batched tf.data.Dataset.
      """
      dataset = self.get_dataset(shuffle)
      dataset = dataset.repeat(repeats)
      dataset = dataset.batch(batch_size, drop_remainder=drop_remainder)
      dataset = dataset.prefetch(buffer_size=_AUTOTUNE)
      return dataset
  
imports: import os
  from absl import logging
  from ddsp.spectral_ops import CREPE_FRAME_SIZE
  from ddsp.spectral_ops import CREPE_SAMPLE_RATE
  from ddsp.spectral_ops import get_framed_lengths
  import gin
  import tensorflow.compat.v2
  import tensorflow_datasets
label_desc: Use image node_id 5 for calling the DataProvider obj's underlying member method code with example usage: obj.get_batch(batch_size, shuffle, repeats, drop_remainder) and returns: dataset