<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def substitute_diminished_for_diminished(progression, substitute_index, ignore_suffix=False):
 """Substitute a diminished chord for another diminished chord. 'dim' and 'dim7' suffixes recognized, and 'VI' if there is no suffix. Example: ['IIdim', 'bIVdim', 'bbVIdim'] """

    (roman, acc, suff) = parse_string(progression[substitute_index])
    res = []

    # Diminished progressions
    if suff == 'dim7' or suff == 'dim' or suff == '' and roman in ['VII']\
         or ignore_suffix:
        if suff == '':
            suff = 'dim'

        # Add diminished chord
        last = roman
        for x in range(3):
            next = skip(last, 2)
            acc += interval_diff(last, next, 3)
            res.append(tuple_to_string((next, acc, suff)))
            last = next
    return res