code: def testExtractPianorollSequences(self):
      music_testing_lib.add_track_to_sequence(
          self.note_sequence, 0, [(60, 100, 0.0, 4.0)]
      )
      quantized_sequence = sequences_lib.quantize_note_sequence(
          self.note_sequence, steps_per_quarter=1
      )
  
      seqs, _ = pianoroll_pipeline.extract_pianoroll_sequences(
          quantized_sequence
      )
      self.assertLen(seqs, 1)
  
      seqs, _ = pianoroll_pipeline.extract_pianoroll_sequences(
          quantized_sequence, min_steps_discard=2, max_steps_discard=5
      )
      self.assertLen(seqs, 1)
  
      self.note_sequence.notes[0].end_time = 1.0
      self.note_sequence.total_time = 1.0
      quantized_sequence = sequences_lib.quantize_note_sequence(
          self.note_sequence, steps_per_quarter=1
      )
      seqs, _ = pianoroll_pipeline.extract_pianoroll_sequences(
          quantized_sequence, min_steps_discard=3, max_steps_discard=5
      )
      self.assertEmpty(seqs)
  
      self.note_sequence.notes[0].end_time = 10.0
      self.note_sequence.total_time = 10.0
      quantized_sequence = sequences_lib.quantize_note_sequence(
          self.note_sequence, steps_per_quarter=1
      )
      seqs, _ = pianoroll_pipeline.extract_pianoroll_sequences(
          quantized_sequence, min_steps_discard=3, max_steps_discard=5
      )
      self.assertEmpty(seqs)
  
file_path: magenta/magenta/pipelines/pianoroll_pipeline_test.py
imports: from absl.testing import absltest
  from magenta.pipelines import pianoroll_pipeline
  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 2 for calling the PianorollPipelineTest obj's underlying member method code with example usage: obj.testExtractPianorollSequences() without return types