code: def testDecode(self):
      encoder = music_encoders.MidiPerformanceEncoder(
          steps_per_second=100,
          num_velocity_bins=32,
          min_pitch=21,
          max_pitch=108,
          ngrams=[(277, 129)],
      )
  
      ids = [
          302,  # VELOCITY(25)
          41,  # NOTE-ON(60)
          310,  # TIME-SHIFT(100), NOTE-OFF(60)
      ]
  
      # Decode method returns MIDI filename, read and convert to NoteSequence.
      filename = encoder.decode(ids)
      ns = note_seq.midi_file_to_sequence_proto(filename)
  
      # Remove default tempo & time signature.
      del ns.tempos[:]
      del ns.time_signatures[:]
  
      expected_ns = note_seq.NoteSequence(ticks_per_quarter=220)
      testing_lib.add_track_to_sequence(
          expected_ns, 0, [(60, 97, 0.0, 1.0)]
      )
  
      # Add source info fields.
      expected_ns.source_info.encoding_type = (
          note_seq.NoteSequence.SourceInfo.MIDI
      )
      expected_ns.source_info.parser = (
          note_seq.NoteSequence.SourceInfo.PRETTY_MIDI
      )
  
      self.assertEqual(expected_ns, ns)
  
imports: import tempfile
  from magenta.models.score2perf import music_encoders
  import note_seq
  from note_seq import testing_lib
  import tensorflow.compat.v1
label_desc: Use image node_id 8 for calling the MidiPerformanceEncoderTest obj's underlying member method code with example usage: obj.testDecode() without return types