code: def one_hot_melody_encoder_decoder(min_note, max_note):
      """Return a OneHotEventSequenceEncoderDecoder for melodies.
  
      Args:
        min_note: The minimum midi pitch the encoded melodies can have.
        max_note: The maximum midi pitch (exclusive) the encoded melodies can have.
  
      Returns:
        A melody OneHotEventSequenceEncoderDecoder.
      """
      return note_seq.OneHotEventSequenceEncoderDecoder(
          note_seq.MelodyOneHotEncoding(min_note, max_note)
      )
  
file_path: magenta/magenta/models/melody_rnn/melody_rnn_config_flags.py
imports: from magenta.contrib import training
  from magenta.models.melody_rnn import melody_rnn_model
  import note_seq
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling a global function with example usage: one_hot_melody_encoder_decoder(min_note, max_note) and returns: note_seq