<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_interval_shorthand(self, startnote, shorthand, up=True):
 """Empty the container and add the note described in the startnote and shorthand. See core.intervals for the recognized format. Examples: ['C-4', 'G-4'] ['F-3', 'C-4'] """

        self.empty()
        if type(startnote) == str:
            startnote = Note(startnote)
        n = Note(startnote.name, startnote.octave, startnote.dynamics)
        n.transpose(shorthand, up)
        self.add_notes([startnote, n])
        return self