code: def _pitch_classes():
      r'''Map from pitch class (str) to semitone (int).'''
      pitch_classes = ['C', 'D', 'E', 'F', 'G', 'A', 'B']
      semitones = [0, 2, 4, 5, 7, 9, 11]
      return dict([(c, s) for c, s in zip(pitch_classes, semitones)]f _pitch_classes():
      r'''Map from pitch class (str) to semitone (int).'''
      pitch_classes = ['C', 'D', 'E', 'F', 'G', 'A', 'B']
      semitones = [0, 2, 4, 5, 7, 9, 11]
      return dict([(c, s) for c, s in zip(pitch_classes, semitones)])
docs: r'''Map from pitch class (str) to semitone (int).