code: def transpose(self, interval, up=True):
          
          (old, o_octave) = (self.name, self.octave)
          self.name = intervals.from_shorthand(self.name, interval, up)
          if up:
              if self < Note(old, o_octave):
                  self.octave += 1
          else:
              if self > Note(old, o_octave):
                  self.octave -= 1
docs: Transpose the note up or down the interval.
  
          Examples:
          >>> a = Note('A')
          >>> a.transpose('3')
          >>> a
          'C#-5'
          >>> a.transpose('3', False)
          >>> a
          'A-4'