code: def load_midi(filename, sustain=False):
      """
      Load notes from a MIDI file.
  
      Parameters
      ----------
      filename : str
          MIDI file.
      sustain : bool, optional
          Apply sustain information to the notes.
  
      Returns
      -------
      numpy array
          Notes ('onset time' 'note number' 'duration' 'velocity' 'channel')
  
      """
      if sustain:
          return MIDIFile(filename).sustained_notes
      return MIDIFile(filename).notes
  
imports: from __future__ import absolute_import, division, print_function
  import warnings
  import mido
  import numpy
label_desc: Use image node_id 7 for calling a global function with example usage: load_midi(filename, sustain) and returns: MIDIFile, MIDIFile