@staticmethod
def _parseAccidental(accidental):
    """
        Given an accidental, calculate its shift amount.

        :param accidental: str. An accidental string.
        :return:
        """
    if accidental == "'":
        return -1
    if accidental.endswith("'"):
        mul = -1
        accidental = accidental[:-1]
    else:
        mul = 1
    try:
        return int(accidental) * mul
    except Exception as e:
        raise ValueError('Cannot convert accidental to integer: %s' %
            accidental)
