def transpose(label, n_semitones):
<EOL>match = re.match(six.text_type('<STR_LIT>'),<EOL>six.text_type(label))<EOL>if not match:<EOL><INDENT>return label<EOL><DEDENT>note = match.group('<STR_LIT>')<EOL>new_note = librosa.midi_to_note(librosa.note_to_midi(note) + n_semitones,<EOL>octave=False)<EOL>return new_note + match.group('<STR_LIT>')<EOL>
Transpose a chord label by some number of semitones

    Parameters
    ----------
    label : str
        A chord string

    n_semitones : float
        The number of semitones to move `label`

    Returns
    -------
    label_transpose : str
        The transposed chord label