code: def testProbsToPianorollViterbi(self):
      frame_probs = np.array(
          [[0.2, 0.1], [0.5, 0.1], [0.5, 0.1], [0.8, 0.1]]
      )
      onset_probs = np.array(
          [[0.1, 0.1], [0.1, 0.1], [0.9, 0.1], [0.1, 0.1]]
      )
      pianoroll = infer_util.probs_to_pianoroll_viterbi(
          frame_probs, onset_probs
      )
      np.testing.assert_array_equal(
          [
              [False, False],
              [False, False],
              [True, False],
              [True, False],
          ],
          pianoroll,
      )
  
file_path: magenta/magenta/models/onsets_frames_transcription/infer_util_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from magenta.models.onsets_frames_transcription import infer_util
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling the InferUtilTest obj's underlying member method code with example usage: obj.testProbsToPianorollViterbi() without return types