def _centsshown(centsdev, divsPerSemitone=4) ->str:
    """
    Given a cents deviation from a chromatic pitch, return
    a string to be shown along the notation, to indicate the
    true tuning of the note. If we are very close to a notated
    pitch (depending on divsPerSemitone), then we don't show
    anything. Otherwise, the deviation is always the deviation
    from the chromatic pitch

    Args:
        centsdev: the deviation from the chromatic pitch
        divsPerSemitone: if given, overrides the value in the config

    Returns:
        the string to be shown alongside the notated pitch
    """
    pivot = int(round(100 / divsPerSemitone))
    dist = min(centsdev % pivot, -centsdev % pivot)
    if dist <= 2:
        return ''
    if centsdev < 0:
        return f'–{-centsdev}'
    return str(int(centsdev))
