code: def testExtractLeadSheetFragmentsCoincidentChords(self):
      music_testing_lib.add_track_to_sequence(
          self.note_sequence, 0, [(12, 100, 2, 4), (11, 1, 6, 11)]
      )
      music_testing_lib.add_track_to_sequence(
          self.note_sequence,
          1,
          [
              (12, 127, 2, 4),
              (14, 50, 6, 8),
              (50, 100, 33, 37),
              (52, 100, 34, 37),
          ],
      )
      music_testing_lib.add_chords_to_sequence(
          self.note_sequence,
          [("C", 2), ("G7", 6), ("Cmaj7", 33), ("F", 33)],
      )
      quantized_sequence = sequences_lib.quantize_note_sequence(
          self.note_sequence, steps_per_quarter=1
      )
      (
          lead_sheets,
          _,
      ) = lead_sheet_pipelines.extract_lead_sheet_fragments(
          quantized_sequence,
          min_bars=1,
          gap_bars=2,
          min_unique_pitches=2,
          ignore_polyphonic_notes=True,
          require_chords=True,
      )
      melodies, _ = melody_pipelines.extract_melodies(
          quantized_sequence,
          min_bars=1,
          gap_bars=2,
          min_unique_pitches=2,
          ignore_polyphonic_notes=True,
      )
      (
          chord_progressions,
          _,
      ) = chord_pipelines.extract_chords_for_melodies(
          quantized_sequence, melodies
      )
      # Last lead sheet should be rejected for coincident chords.
      self.assertEqual(
          list(melodies[:2]),
          list(lead_sheet.melody for lead_sheet in lead_sheets),
      )
      self.assertEqual(
          list(chord_progressions[:2]),
          list(lead_sheet.chords for lead_sheet in 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 5 for calling the LeadSheetPipelinesTest obj's underlying member method code with example usage: obj.testExtractLeadSheetFragmentsCoincidentChords() without return types