'Construct a LeadSheet.
If `melody` and `chords` are specified, instantiate with the provided
melody and chords.  Otherwise, create an empty LeadSheet.
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, or if only
one of melody or chords is specified.'

def __init__(self, melody=None, chords=None):

    if ((melody is None) != (chords is None)):
        raise MelodyChordsMismatchException('melody    and    chords    must    be    both    specified    or    both    unspecified')
    if (melody is not None):
        self._from_melody_and_chords(melody, chords)
    else:
        self._reset()
