class_docstr: A Module that converts lead sheets to a model specific encoding.
code: def transform(self, input_object):
      lead_sheet = input_object
      lead_sheet.squash(
          self._min_note, self._max_note, self._transpose_to_key
      )
      try:
          encoded = [
              self._conditional_encoder_decoder.encode(
                  lead_sheet.chords, lead_sheet.melody
              )
          ]
          stats = []
      except note_seq.ChordEncodingError as e:
          tf.logging.warning("Skipped lead sheet: %s", e)
          encoded = []
          stats = [statistics.Counter("chord_encoding_exception", 1)]
      except note_seq.ChordSymbolError as e:
          tf.logging.warning("Skipped lead sheet: %s", e)
          encoded = []
          stats = [statistics.Counter("chord_symbol_exception", 1)]
      self._set_stats(stats)
      return [
          pipelines_common.make_sequence_example(*enc)
          for enc in encoded
      ]
  
file_path: magenta/magenta/models/improv_rnn/improv_rnn_pipeline.py
imports: from magenta.pipelines import dag_pipeline
  from magenta.pipelines import lead_sheet_pipelines
  from magenta.pipelines import note_sequence_pipelines
  from magenta.pipelines import pipeline
  from magenta.pipelines import pipelines_common
  from magenta.pipelines import statistics
  import note_seq
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling the EncoderPipeline obj's underlying member method code with example usage: obj.transform(input_object) and returns: unknown