class_docstr: Class for reading TFRecords and returning a dataset.
class_docstr_tok: ["Class","for","reading","TFRecords","and","returning","a","dataset","."]
docstr: Read dataset.
  
  Args:
    shuffle: Whether to shuffle the files.
  
  Returns:
    dataset: A tf.dataset that reads from the TFRecord.
code: def get_dataset(self, shuffle=True):
      """Read dataset.
  
      Args:
        shuffle: Whether to shuffle the files.
  
      Returns:
        dataset: A tf.dataset that reads from the TFRecord.
      """
  
      def parse_tfexample(record):
          return tf.io.parse_single_example(record, self.features_dict)
  
      filenames = tf.data.Dataset.list_files(
          self._file_pattern, shuffle=shuffle
      )
      dataset = filenames.interleave(
          map_func=tf.data.TFRecordDataset,
          cycle_length=40,
          num_parallel_calls=_AUTOTUNE,
      )
      dataset = dataset.map(
          parse_tfexample, num_parallel_calls=_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 4 for calling the TFRecordProvider obj's underlying member method code with example usage: obj.get_dataset(shuffle) and returns: dataset, tf