code: def substitute_diminished_for_diminished(progression, substitute_index,
          ignore_suffix=False):
      
      (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
docs: Substitute a diminished chord for another diminished chord.
  
      'dim' and 'dim7' suffixes recognized, and 'VI' if there is no suffix.
  
      Example:
      >>> substitute_diminished_for_diminished(['VII'], 0)
      ['IIdim', 'bIVdim', 'bbVIdim']