code: def _drums_only_metric_ops(
      features,
      labels,
      frame_probs,
      onset_probs,
      frame_predictions,
      onset_predictions,
      offset_predictions,
      velocity_values,
      hparams,
  ):
      """Generate drum metrics: offsets/frames are ignored."""
      del frame_predictions, offset_predictions  # unused
  
      metric_ops = metrics.define_metrics(
          frame_probs=frame_probs,
          onset_probs=onset_probs,
          frame_predictions=onset_predictions,
          onset_predictions=onset_predictions,
          offset_predictions=onset_predictions,
          velocity_values=velocity_values,
          length=features.length,
          sequence_label=labels.note_sequence,
          frame_labels=labels.labels,
          sequence_id=features.sequence_id,
          hparams=hparams,
          min_pitch=constants.MIN_MIDI_PITCH,
          max_pitch=constants.MAX_MIDI_PITCH,
          prefix="drums/",
          onsets_only=True,
          pitch_map=drum_mappings.GROOVE_PITCH_NAMES,
      )
      return metric_ops
  
file_path: magenta/magenta/models/onsets_frames_transcription/estimator_spec_util.py
imports: import functools
  from magenta.models.onsets_frames_transcription import constants
  from magenta.models.onsets_frames_transcription import drum_mappings
  from magenta.models.onsets_frames_transcription import infer_util
  from magenta.models.onsets_frames_transcription import metrics
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
  import tf_slim
label_desc: Use image node_id 1 for calling a global function with example usage: _drums_only_metric_ops(features, labels, frame_probs, onset_probs, frame_predictions, onset_predictions, offset_predictions, velocity_values, hparams) and returns: metric_ops