code: def testDrumsExtractor(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), (12, 1, 6, 8)],
          is_drum=True,
      )
      music_testing_lib.add_track_to_sequence(
          note_sequence, 1, [(12, 127, 2, 4), (14, 50, 6, 8)]
      )
      quantized_sequence = sequences_lib.quantize_note_sequence(
          note_sequence, steps_per_quarter=1
      )
      expected_events = [
          [
              NO_DRUMS,
              NO_DRUMS,
              DRUMS(12),
              NO_DRUMS,
              NO_DRUMS,
              NO_DRUMS,
              DRUMS(11, 12),
          ]
      ]
      expected_drum_tracks = []
      for events_list in expected_events:
          drums = drums_lib.DrumTrack(
              events_list, steps_per_quarter=1, steps_per_bar=4
          )
          expected_drum_tracks.append(drums)
      unit = drum_pipelines.DrumsExtractor(min_bars=1, gap_bars=1)
      self._unit_transform_test(
          unit, quantized_sequence, expected_drum_tracks
      )
  
file_path: magenta/magenta/pipelines/drum_pipelines_test.py
imports: from absl.testing import absltest
  from magenta.common import testing_lib
  from magenta.pipelines import drum_pipelines
  from note_seq import drums_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 DrumPipelinesTest obj's underlying member method code with example usage: obj.testDrumsExtractor() without return types