class_docstr: Parses features in the TFDS NSynth dataset.
  
  If running on Cloud, it is recommended you set `data_dir` to
  'gs://tfds-data/datasets' to avoid unnecessary downloads.
class_docstr_tok: ["Parses","features","in","the","TFDS","NSynth","dataset",".","If","running","on","Cloud",",","it","is","recommended","you","set","`","data_dir","`","to","'gs",":","\/\/tfds-data\/datasets","'","to","avoid","unnecessary","downloads","."]
docstr: Returns dataset with slight restructuring of feature dictionary.
code: def get_dataset(self, shuffle=True):
      """Returns dataset with slight restructuring of feature dictionary."""
  
      def preprocess_ex(ex):
          ex_out = {
              "audio": ex["audio"],
              "f0_hz": ex["f0"]["hz"],
              "f0_confidence": ex["f0"]["confidence"],
              "loudness_db": ex["loudness"]["db"],
          }
          if self._include_note_labels:
              ex_out.update(
                  {
                      "pitch": ex["pitch"],
                      "instrument_source": ex["instrument"]["source"],
                      "instrument_family": ex["instrument"]["family"],
                      "instrument": ex["instrument"]["label"],
                  }
              )
          return ex_out
  
      dataset = super().get_dataset(shuffle)
      dataset = dataset.map(preprocess_ex, 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 2 for calling the NSynthTfds obj's underlying member method code with example usage: obj.get_dataset(shuffle) and returns: dataset, ex_out