class_docstr: Metrics for MIDI heuristic.
class_docstr_tok: ["Metrics","for","MIDI","heuristic","."]
code: def sample(self, batch, outputs, step):
      notes = self._compute_heuristic_notes(outputs)
      outputs["heuristic_notes"] = notes
      summaries.midi_summary(
          outputs,
          step,
          "heuristic",
          self._frame_rate,
          "heuristic_notes",
      )
      summaries.pianoroll_summary(
          outputs,
          step,
          "heuristic",
          self._frame_rate,
          "heuristic_notes",
      )
  
imports: import ddsp
  from ddsp.training import heuristics
  from ddsp.training import metrics
  from ddsp.training import summaries
  import gin
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 4 for calling the MidiHeuristicEvaluator obj's underlying member method code with example usage: obj.sample(batch, outputs, step) without return types