code: def testExtractMelodiesTooFewPitches(self):
      # Test that extract_melodies discards melodies with too few pitches where
      # pitches are equivalent by octave.
      music_testing_lib.add_track_to_sequence(
          self.note_sequence,
          0,
          [
              (12, 100, 0, 1),
              (13, 100, 1, 2),
              (18, 100, 2, 3),
              (24, 100, 3, 4),
              (25, 100, 4, 5),
          ],
      )
      music_testing_lib.add_track_to_sequence(
          self.note_sequence,
          1,
          [
              (12, 100, 0, 1),
              (13, 100, 1, 2),
              (18, 100, 2, 3),
              (25, 100, 3, 4),
              (26, 100, 4, 5),
          ],
      )
  
      quantized_sequence = sequences_lib.quantize_note_sequence(
          self.note_sequence, steps_per_quarter=1
      )
  
      expected = [[12, 13, 18, 25, 26]]
      melodies, _ = melody_pipelines.extract_melodies(
          quantized_sequence,
          min_bars=1,
          gap_bars=1,
          min_unique_pitches=4,
          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 10 for calling the MelodyPipelinesTest obj's underlying member method code with example usage: obj.testExtractMelodiesTooFewPitches() without return types