code: def testExtractMelodiesMelodyTooLong(self):
      music_testing_lib.add_track_to_sequence(
          self.note_sequence, 0, [(12, 127, 2, 4), (14, 50, 6, 15)]
      )
      music_testing_lib.add_track_to_sequence(
          self.note_sequence, 1, [(12, 127, 2, 4), (14, 50, 6, 18)]
      )
  
      quantized_sequence = sequences_lib.quantize_note_sequence(
          self.note_sequence, steps_per_quarter=1
      )
  
      expected = [
          [NO_EVENT, NO_EVENT, 12, NO_EVENT, NOTE_OFF, NO_EVENT, 14]
          + [NO_EVENT] * 7,
          [NO_EVENT, NO_EVENT, 12, NO_EVENT, NOTE_OFF, NO_EVENT, 14]
          + [NO_EVENT] * 7,
      ]
      melodies, _ = melody_pipelines.extract_melodies(
          quantized_sequence,
          min_bars=1,
          max_steps_truncate=14,
          max_steps_discard=18,
          gap_bars=1,
          min_unique_pitches=2,
          ignore_polyphonic_notes=True,
      )
      melodies = [list(melody) for melody in melodies]
      self.assertEqual(expected, melodies)
  
imports: from absl.testing import absltest
  from magenta.common import testing_lib
  from magenta.pipelines import melody_pipelines
  from note_seq import constants
  from note_seq import melodies_lib
  from note_seq import sequences_lib
  from note_seq import testing_lib
  from note_seq.protobuf import music_pb2
label_desc: Use image node_id 8 for calling the MelodyPipelinesTest obj's underlying member method code with example usage: obj.testExtractMelodiesMelodyTooLong() without return types