class_docstr: A Pipeline that quantizes NoteSequence data.
class_docstr_tok: ["A","Pipeline","that","quantizes","NoteSequence","data","."]
code: def transform(self, input_object):
      note_sequence = input_object
      try:
          if self._steps_per_quarter is not None:
              quantized_sequence = sequences_lib.quantize_note_sequence(
                  note_sequence, self._steps_per_quarter
              )
          else:
              quantized_sequence = (
                  sequences_lib.quantize_note_sequence_absolute(
                      note_sequence, self._steps_per_second
                  )
              )
          return [quantized_sequence]
      except sequences_lib.MultipleTimeSignatureError as e:
          tf.logging.warning(
              "Multiple time signatures in NoteSequence %s: %s",
              note_sequence.filename,
              e,
          )
          self._set_stats(
              [
                  statistics.Counter(
                      "sequences_discarded_because_multiple_time_signatures",
                      1,
                  )
              ]
          )
          return []
      except sequences_lib.MultipleTempoError as e:
          tf.logging.warning(
              "Multiple tempos found in NoteSequence %s: %s",
              note_sequence.filename,
              e,
          )
          self._set_stats(
              [
                  statistics.Counter(
                      "sequences_discarded_because_multiple_tempos", 1
                  )
              ]
          )
          return []
      except sequences_lib.BadTimeSignatureError as e:
          tf.logging.warning(
              "Bad time signature in NoteSequence %s: %s",
              note_sequence.filename,
              e,
          )
          self._set_stats(
              [
                  statistics.Counter(
                      "sequences_discarded_because_bad_time_signature",
                      1,
                  )
              ]
          )
          return []
  
imports: import copy
  from magenta.pipelines import pipeline
  from magenta.pipelines import statistics
  from note_seq import constants
  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 Quantizer obj's underlying member method code with example usage: obj.transform(input_object) and returns: list, list, list, list