class_docstr: Extracts lead sheet fragments from a quantized NoteSequence.
class_docstr_tok: ["Extracts","lead","sheet","fragments","from","a","quantized","NoteSequence","."]
code: def transform(self, input_object):
      quantized_sequence = input_object
      try:
          lead_sheets, stats = extract_lead_sheet_fragments(
              quantized_sequence,
              min_bars=self._min_bars,
              max_steps_truncate=self._max_steps,
              min_unique_pitches=self._min_unique_pitches,
              gap_bars=self._gap_bars,
              ignore_polyphonic_notes=self._ignore_polyphonic_notes,
              filter_drums=self._filter_drums,
              require_chords=self._require_chords,
              all_transpositions=self._all_transpositions,
          )
      except events_lib.NonIntegerStepsPerBarError as detail:
          tf.logging.warning("Skipped sequence: %s", detail)
          lead_sheets = []
          stats = [statistics.Counter("non_integer_steps_per_bar", 1)]
      except chord_symbols_lib.ChordSymbolError as detail:
          tf.logging.warning("Skipped sequence: %s", detail)
          lead_sheets = []
          stats = [statistics.Counter("chord_symbol_exception", 1)]
      self._set_stats(stats)
      return lead_sheets
  
file_path: magenta/magenta/pipelines/lead_sheet_pipelines.py
imports: import copy
  from magenta.pipelines import chord_pipelines
  from magenta.pipelines import melody_pipelines
  from magenta.pipelines import pipeline
  from magenta.pipelines import statistics
  from note_seq import chord_symbols_lib
  from note_seq import chords_lib
  from note_seq import events_lib
  from note_seq import lead_sheets_lib
  from note_seq import LeadSheet
  from note_seq import sequences_lib
  from note_seq.protobuf import music_pb2
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling the LeadSheetExtractor obj's underlying member method code with example usage: obj.transform(input_object) and returns: lead_sheets