'Initializes a LeadSheet with a given melody and chords.
Args:
melody: A Melody object.
chords: A ChordProgression object.
Raises:
MelodyChordsMismatchException: If the melody and chord progression differ
in temporal resolution or position in the source sequence.'

def _from_melody_and_chords(self, melody, chords):

    if ((len(melody) != len(chords)) or (melody.steps_per_bar != chords.steps_per_bar) or (melody.steps_per_quarter != chords.steps_per_quarter) or (melody.start_step != chords.start_step) or (melody.end_step != chords.end_step)):
        raise MelodyChordsMismatchException()
    self._melody = melody
    self._chords = chords
