class_docstr: Dataset object to help manage the TFRecord loading.
docstr: Get a single example from the tfrecord file.
  
  Args:
    batch_size: Int, minibatch size.
  
  Returns:
    tf.Example protobuf parsed from tfrecord.
code: def get_example(self, batch_size):
      """Get a single example from the tfrecord file.
  
      Args:
        batch_size: Int, minibatch size.
  
      Returns:
        tf.Example protobuf parsed from tfrecord.
      """
      reader = tf.TFRecordReader()
      num_epochs = None if self.is_training else 1
      capacity = batch_size
      path_queue = tf.train.input_producer(
          [self.record_path],
          num_epochs=num_epochs,
          shuffle=self.is_training,
          capacity=capacity,
      )
      unused_key, serialized_example = reader.read(path_queue)
      features = {
          "note_str": tf.FixedLenFeature([], dtype=tf.string),
          "pitch": tf.FixedLenFeature([1], dtype=tf.int64),
          "velocity": tf.FixedLenFeature([1], dtype=tf.int64),
          "audio": tf.FixedLenFeature([64000], dtype=tf.float32),
          "qualities": tf.FixedLenFeature([10], dtype=tf.int64),
          "instrument_source": tf.FixedLenFeature([1], dtype=tf.int64),
          "instrument_family": tf.FixedLenFeature([1], dtype=tf.int64),
      }
      example = tf.parse_single_example(serialized_example, features)
      return example
  
file_path: magenta/magenta/models/nsynth/reader.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from magenta.models.nsynth import utils
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling the NSynthDataset obj's underlying member method code with example usage: obj.get_example(batch_size) and returns: example