<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_shorthand(self, shorthand):
 """Convert from traditional Helmhotz pitch notation. Examples: 'C-0' 'C-2' 'C-4' """

        name = ''
        octave = 0
        for x in shorthand:
            if x in ['a', 'b', 'c', 'd', 'e', 'f', 'g']:
                name = str.upper(x)
                octave = 3
            elif x in ['A', 'B', 'C', 'D', 'E', 'F', 'G']:
                name = x
                octave = 2
            elif x in ['#', 'b']:
                name += x
            elif x == ',':
                octave -= 1
            elif x == "'":
                octave += 1
        return self.set_note(name, octave, {})