docs: def remove_redundant_accidentals(note):
      """Remove redundant sharps and flats from the given note.
  
      Examples:
      >>> remove_redundant_accidentals('C##b')
      'C#'
      >>> remove_redundant_accidentals('Eb##b')
      'E'
      """
      val = 0
      for token in note[1:]:
          if token == 'b':
              val -= 1
          elif token == '#':
              val += 1
      result = note[0]
      while val > 0:
          result = augment(result)
          val -= 1
      while val < 0:
          result = diminish(result)
          val += 1
      return result