code: def testLeadSheetExtractor(self):
      note_sequence = common_testing_lib.parse_test_proto(
          music_pb2.NoteSequence,
          """
          time_signatures: {
            numerator: 4
            denominator: 4}
          tempos: {
            qpm: 60}""",
      )
      music_testing_lib.add_track_to_sequence(
          note_sequence, 0, [(12, 100, 2, 4), (11, 1, 6, 7)]
      )
      music_testing_lib.add_track_to_sequence(
          note_sequence, 1, [(12, 127, 2, 4), (14, 50, 6, 8)]
      )
      music_testing_lib.add_chords_to_sequence(
          note_sequence, [("Cm7", 2), ("F9", 4), ("G7b9", 6)]
      )
      quantized_sequence = sequences_lib.quantize_note_sequence(
          note_sequence, steps_per_quarter=1
      )
      expected_melody_events = [
          [NO_EVENT, NO_EVENT, 12, NO_EVENT, NOTE_OFF, NO_EVENT, 11],
          [
              NO_EVENT,
              NO_EVENT,
              12,
              NO_EVENT,
              NOTE_OFF,
              NO_EVENT,
              14,
              NO_EVENT,
          ],
      ]
      expected_chord_events = [
          [NO_CHORD, NO_CHORD, "Cm7", "Cm7", "F9", "F9", "G7b9"],
          [
              NO_CHORD,
              NO_CHORD,
              "Cm7",
              "Cm7",
              "F9",
              "F9",
              "G7b9",
              "G7b9",
          ],
      ]
      expected_lead_sheets = []
      for melody_events, chord_events in zip(
          expected_melody_events, expected_chord_events
      ):
          melody = melodies_lib.Melody(
              melody_events, steps_per_quarter=1, steps_per_bar=4
          )
          chords = chords_lib.ChordProgression(
              chord_events, steps_per_quarter=1, steps_per_bar=4
          )
          lead_sheet = lead_sheets_lib.LeadSheet(melody, chords)
          expected_lead_sheets.append(lead_sheet)
      unit = lead_sheet_pipelines.LeadSheetExtractor(
          min_bars=1,
          min_unique_pitches=1,
          gap_bars=1,
          all_transpositions=False,
      )
      self._unit_transform_test(
          unit, quantized_sequence, expected_lead_sheets
      )
  
imports: from absl.testing import absltest
  from magenta.common import testing_lib
  from magenta.pipelines import chord_pipelines
  from magenta.pipelines import lead_sheet_pipelines
  from magenta.pipelines import melody_pipelines
  from note_seq import chords_lib
  from note_seq import constants
  from note_seq import lead_sheets_lib
  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 3 for calling the LeadSheetPipelinesTest obj's underlying member method code with example usage: obj.testLeadSheetExtractor() without return types